diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 83e9193969..56591c42cb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,7 +26,7 @@ jobs: run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${GITHUB_ACTOR,,} --password-stdin - name: Build Image - run: OSS_REGISTRY="ghcr.io/${GITHUB_ACTOR,,}" VERSION="${{ github.ref_name }}" make image + run: OSS_REGISTRY="ghcr.io/oracle" VERSION="${{ github.ref_name }}" make image - name: Push Image - run: OSS_REGISTRY="ghcr.io/${GITHUB_ACTOR,,}" VERSION="${{ github.ref_name }}" make docker-push-all + run: OSS_REGISTRY="ghcr.io/oracle" VERSION="${{ github.ref_name }}" make docker-push-all diff --git a/Dockerfile b/Dockerfile index 94be6e94aa..22522e500d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,19 +32,17 @@ FROM oraclelinux:8-slim COPY --from=0 /go/src/github.com/oracle/oci-cloud-controller-manager/dist/* /usr/local/bin/ COPY --from=0 /go/src/github.com/oracle/oci-cloud-controller-manager/image/* /usr/local/bin/ -RUN yum install -y util-linux \ - && yum install -y e2fsprogs \ - && yum install -y xfsprogs \ - && yum clean all +RUN microdnf -y install util-linux e2fsprogs xfsprogs python2 && \ + microdnf update && \ + microdnf clean all COPY scripts/encrypt-mount /sbin/encrypt-mount COPY scripts/encrypt-umount /sbin/encrypt-umount COPY scripts/rpm-host /sbin/rpm-host COPY scripts/chroot-bash /sbin/chroot-bash - RUN chmod 755 /sbin/encrypt-mount RUN chmod 755 /sbin/encrypt-umount RUN chmod 755 /sbin/rpm-host RUN chmod 755 /sbin/chroot-bash -COPY --from=0 /go/src/github.com/oracle/oci-cloud-controller-manager/dist/* /usr/local/bin/ +COPY --from=0 /go/src/github.com/oracle/oci-cloud-controller-manager/dist/* /usr/local/bin/ \ No newline at end of file diff --git a/Dockerfile_arm_all b/Dockerfile_arm_all index 37aefcf5a7..1bdf8f9cf8 100644 --- a/Dockerfile_arm_all +++ b/Dockerfile_arm_all @@ -1,6 +1,6 @@ ARG CI_IMAGE_REGISTRY -FROM golang:1.20.4 as builder +FROM golang:1.21.5 as builder ARG COMPONENT @@ -14,12 +14,11 @@ WORKDIR $SRC RUN ARCH=arm make clean build-arm-all -FROM arm64v8/oraclelinux:7-slim +FROM arm64v8/oraclelinux:8-slim -RUN yum install -y util-linux \ - && yum install -y e2fsprogs \ - && yum clean all - \ +RUN microdnf -y install util-linux e2fsprogs xfsprogs python2 && \ + microdnf update && \ + microdnf clean all COPY scripts/encrypt-mount /sbin/encrypt-mount COPY scripts/encrypt-umount /sbin/encrypt-umount @@ -30,4 +29,4 @@ RUN chmod 755 /sbin/encrypt-umount RUN chmod 755 /sbin/rpm-host RUN chmod 755 /sbin/chroot-bash -COPY --from=0 /go/src/github.com/oracle/oci-cloud-controller-manager/dist/arm/* /usr/local/bin/ +COPY --from=0 /go/src/github.com/oracle/oci-cloud-controller-manager/dist/arm/* /usr/local/bin/ \ No newline at end of file diff --git a/Makefile b/Makefile index 7ed17120cd..676b96c54f 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ else VERSION ?= ${VERSION} endif -RELEASE = v1.28.0 +RELEASE = v1.29.0 GOOS ?= linux ARCH ?= amd64 diff --git a/README.md b/README.md index d1f3142c4e..75586cebf2 100644 --- a/README.md +++ b/README.md @@ -31,14 +31,15 @@ cloud-provider specific code out of the Kubernetes codebase. | v1.23.0 | v1.23 | - | | v1.24.2 | v1.24 | - | | v1.25.2 | v1.25 | - | -| v1.26.3 | v1.26 | - | -| v1.27.2 | v1.27 | - | -| v1.28.0 | v1.28 | - | +| v1.26.4 | v1.26 | - | +| v1.27.3 | v1.27 | - | +| v1.28.1 | v1.28 | - | +| v1.29.0 | v1.29 | - | Note: -Versions older than v1.26.3 are no longer supported, new features / bug fixes will be available in v1.26.3 and later. +Versions older than v1.27.3 are no longer supported, new features / bug fixes will be available in v1.27.3 and later. ## Implementation Currently `oci-cloud-controller-manager` implements: @@ -170,12 +171,6 @@ This project welcomes contributions from the community. Before submitting a pull Please consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process -## Upcoming Releases - -| Release | Expected Release Date | -|-----------------------|-----------------------| -| Support for K8s v1.24 | August 2022 | - ## License Copyright (c) 2017, 2023 Oracle and/or its affiliates. All rights reserved. diff --git a/THIRD_PARTY_LICENSES.txt b/THIRD_PARTY_LICENSES.txt index 6f16bab669..e38c13036a 100644 --- a/THIRD_PARTY_LICENSES.txt +++ b/THIRD_PARTY_LICENSES.txt @@ -4,7 +4,7 @@ SPDX:Apache-2.0 ---------------------------------- Copyright ----------------------------------- -Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2017, 2023 Oracle and/or its affiliates. All rights reserved. Copyright 2014 The Kubernetes Authors. Copyright 2016 The Kubernetes Authors. Copyright 2017 Oracle and/or its affiliates. All rights reserved. @@ -174,8 +174,7 @@ This product includes software developed at CoreOS, Inc. github.com/davecgh/go-spew == License Type -===ISC-c06795ed - +=== ISC-c06795ed ISC License Copyright (c) 2012-2016 Dave Collins @@ -193,6 +192,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + == Copyright Copyright (c) 2012-2016 Dave Collins Copyright (c) 2013 Dave Collins @@ -212,17 +212,6 @@ SPDX:Apache-2.0 --------------------------------- (separator) ---------------------------------- -== Dependency -github.com/docker/distribution - -== License Type -SPDX:Apache-2.0 - -== Copyright -Copyright (c) 2013 Damien Le Berrigaud and Nick Wade - ---------------------------------- (separator) ---------------------------------- - == Dependency github.com/emicklei/go-restful/v3 @@ -243,8 +232,7 @@ Copyright 2021 Ernest Micklei. All rights reserved. github.com/evanphx/json-patch == License Type -===BSD-3-Clause-96ae735c - +=== BSD-3-Clause-96ae735c Copyright (c) 2014, Evan Phoenix All rights reserved. @@ -272,6 +260,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2014, Evan Phoenix @@ -296,6 +285,7 @@ SPDX:BSD-3-Clause--modified-by-Google == Copyright Copyright © 2012 The Go Authors. All rights reserved. +Copyright © fsnotify Authors. All rights reserved. --------------------------------- (separator) ---------------------------------- @@ -363,8 +353,7 @@ Copyright 2015 go-swagger maintainers github.com/gofrs/flock == License Type -===BSD-3-Clause-4e7459b3 - +=== BSD-3-Clause-4e7459b3 Copyright (c) 2015-2020, Tim Heckman All rights reserved. @@ -394,6 +383,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2015-2020, Tim Heckman Copyright 2015 Tim Heckman. All rights reserved. @@ -467,8 +457,8 @@ Copyright 2020 The Go Authors. All rights reserved. github.com/google/cel-go == License Type -===Apache-2.0-9e40c772 - +=== Apache-2.0-9e40c772 +=== BSD-3-Clause--modified-by-Google Apache License Version 2.0, January 2004 @@ -704,6 +694,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2018 The Go Authors. All rights reserved. Copyright 2018 Google LLC @@ -767,6 +758,25 @@ Copyright 2016 Google Inc. All rights reserved. Copyright 2017 Google Inc. All rights reserved. Copyright 2018 Google Inc. All rights reserved. Copyright 2021 Google Inc. All rights reserved. +Copyright 2023 Google Inc. All rights reserved. + +--------------------------------- (separator) ---------------------------------- + +== Dependency +github.com/gorilla/websocket + +== License Type +SPDX:BSD-3-Clause--modified-by-Google + +== Copyright +Copyright (c) 2008-2009 Bjoern Hoehrmann +Copyright (c) 2023 The Gorilla Authors. All rights reserved. +Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. +Copyright 2014 The Gorilla WebSocket Authors. All rights reserved. +Copyright 2015 The Gorilla WebSocket Authors. All rights reserved. +Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. Use of +Copyright 2017 The Gorilla WebSocket Authors. All rights reserved. +Copyright 2019 The Gorilla WebSocket Authors. All rights reserved. --------------------------------- (separator) ---------------------------------- @@ -785,8 +795,7 @@ Copyright 2016 Michal Witkowski. All Rights Reserved. github.com/grpc-ecosystem/grpc-gateway/v2 == License Type -===BSD-3-Clause--modified-by-Google-c510a2a0 - +=== BSD-3-Clause--modified-by-Google-c510a2a0 Copyright (c) 2015, Gengo, Inc. All rights reserved. @@ -816,6 +825,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2015, Gengo, Inc. Copyright 2009 The Go Authors. All rights reserved. @@ -894,7 +904,7 @@ SPDX:Apache-2.0 Copyright 2018 The Kubernetes Authors. Copyright 2019 The Kubernetes Authors. Copyright 2020 The Kubernetes Authors. -Copyright 2022 The Kubernetes Authors. +Copyright 2023 The Kubernetes Authors. --------------------------------- (separator) ---------------------------------- @@ -902,8 +912,7 @@ Copyright 2022 The Kubernetes Authors. github.com/magiconair/properties == License Type -===BSD-2-Clause-714beb73 - +=== BSD-2-Clause-714beb73 Copyright (c) 2013-2020, Frank Schroeder All rights reserved. @@ -930,6 +939,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2013-2020, Frank Schroeder Copyright 2011 The Go Authors. All rights reserved. @@ -951,7 +961,7 @@ Copyright (c) 2016 Mail.Ru Group --------------------------------- (separator) ---------------------------------- == Dependency -github.com/matttproud/golang_protobuf_extensions +github.com/matttproud/golang_protobuf_extensions/v2 == License Type SPDX:Apache-2.0 @@ -1049,8 +1059,7 @@ SPDX:Apache-2.0 github.com/munnerz/goautoneg == License Type -===BSD-3-Clause-0c241922 - +=== BSD-3-Clause-0c241922 Copyright (c) 2011, Open Knowledge Foundation Ltd. All rights reserved. @@ -1084,11 +1093,54 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2011, Open Knowledge Foundation Ltd. --------------------------------- (separator) ---------------------------------- +== Dependency +github.com/mxk/go-flowrate + +== License Type +=== BSD-3-Clause-781f3c14 +Copyright (c) 2014 The Go-FlowRate Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the + distribution. + + * Neither the name of the go-flowrate project nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +== Copyright +Copyright (c) 2014 The Go-FlowRate Authors. All rights reserved. + +--------------------------------- (separator) ---------------------------------- + == Dependency github.com/nxadm/tail @@ -1114,6 +1166,7 @@ SPDX:MIT == Copyright Copyright (c) 2013-2014 Onsi Fakhouri Copyright (c) 2016 Yasuhiro Matsumoto +Copyright (c) Yasuhiro MATSUMOTO Copyright 2013 The Go Authors. All rights reserved. --------------------------------- (separator) ---------------------------------- @@ -1150,8 +1203,9 @@ Copyright © 2019, 2020 OCI Contributors github.com/oracle/oci-go-sdk/v65 == License Type -===Apache-2.0-9010f56e - +=== Apache-2.0-9010f56e +=== UPL-1.0 +=== Apache-2.0 Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. @@ -1256,6 +1310,7 @@ END OF TERMS AND CONDITIONS limitations under the License. + == Copyright Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors. Copyright (c) 2013 The Go Authors. All rights reserved. @@ -1277,8 +1332,8 @@ Copyright (c) 2016, 2018, 2020, Oracle and/or its affiliates. github.com/pelletier/go-toml == License Type -===Apache-2.0-e49b63d8 - +=== MIT-e49b63d8 +=== Apache-2.0 The bulk of github.com/pelletier/go-toml is distributed under the MIT license (see below), with the exception of localtime.go and localtime.test.go. Those two files have been copied over from Google's civil library at revision @@ -1528,6 +1583,7 @@ License: limitations under the License. + == Copyright Copyright (c) 2013 - 2021 Thomas Pelletier, Eric Anderton Copyright 2016 Google LLC @@ -1971,6 +2027,7 @@ go.uber.org/zap SPDX:MIT == Copyright +Copyright (c) "*" Uber Technologies, Inc.") Copyright (c) 2016 Uber Technologies, Inc. Copyright (c) 2016, 2017 Uber Technologies, Inc. Copyright (c) 2016-2017 Uber Technologies, Inc. @@ -2061,6 +2118,7 @@ Copyright 2019 The Go Authors. All rights reserved. Copyright 2020 The Go Authors. All rights reserved. Copyright 2021 The Go Authors. All rights reserved. Copyright 2022 The Go Authors. All rights reserved. +Copyright 2023 The Go Authors. All rights reserved. == Patents Additional IP Rights Grant (Patents) @@ -2230,6 +2288,7 @@ Copyright 2020 The Go Authors. All rights reserved. Copyright 2021 The Go Authors. All rights reserved. Copyright 2022 The Go Authors. All rights reserved. Copyright 2023 The Go Authors. All rights reserved. +Copyright 2024 The Go Authors. All rights reserved. == Patents Additional IP Rights Grant (Patents) @@ -2467,7 +2526,9 @@ Copyright 2019 The Go Authors. All rights reserved.", Copyright 2020 The Go Authors. All rights reserved. Copyright 2021 The Go Authors. All rights reserved. Copyright 2022 The Go Authors. All rights reserved. +Copyright 2023 Google Inc. All rights reserved. Copyright 2023 The Go Authors. All rights reserved. +Copyright 2024 The Go Authors. All rights reserved. == Patents Additional IP Rights Grant (Patents) @@ -2537,8 +2598,7 @@ Copyright (c) 2014 Nate Finch gopkg.in/tomb.v1 == License Type -===BSD-3-Clause-95d4102f - +=== BSD-3-Clause-95d4102f tomb - support for clean goroutine termination in Go. Copyright (c) 2010-2011 - Gustavo Niemeyer @@ -2570,6 +2630,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2010-2011 - Gustavo Niemeyer Copyright (c) 2011 - Gustavo Niemeyer @@ -2608,8 +2669,8 @@ limitations under the License. gopkg.in/yaml.v3 == License Type -===Apache-2.0-3c91c172 - +=== MIT-3c91c172 +=== Apache-2.0 This project is covered by two different licenses: MIT and Apache. @@ -2662,6 +2723,7 @@ See the License for the specific language governing permissions and limitations under the License. + == Copyright Copyright (c) 2006-2010 Kirill Simonov Copyright (c) 2006-2011 Kirill Simonov @@ -2900,7 +2962,6 @@ k8s.io/kms SPDX:Apache-2.0 == Copyright -Copyright 2017 The Kubernetes Authors. Copyright 2019 The Kubernetes Authors. Copyright 2022 The Kubernetes Authors. Copyright 2023 The Kubernetes Authors. @@ -2914,6 +2975,7 @@ k8s.io/kube-openapi SPDX:Apache-2.0 == Copyright +Copyright (C) MongoDB, Inc. 2017-present. Copyright (c) 2020 The Go Authors. All rights reserved. Copyright 2015 go-swagger maintainers Copyright 2016 The Kubernetes Authors. @@ -2992,6 +3054,7 @@ SPDX:Apache-2.0 Copyright (c) 2009 The Go Authors. All rights reserved. Copyright (c) 2015-2016 Manfred Touron Copyright (c) 2015-2018 gimme contributors +Copyright (c) Microsoft Corporation. All rights reserved. Copyright 2009 The Go Authors. All rights reserved. Copyright 2014 The Kubernetes Authors. Copyright 2015 The Kubernetes Authors. @@ -3044,6 +3107,7 @@ Copyright 2019 The Kubernetes Authors. Copyright 2020 The Kubernetes Authors. Copyright 2021 The Kubernetes Authors. Copyright 2022 The Kubernetes Authors. +Copyright 2023 The Kubernetes Authors. --------------------------------- (separator) ---------------------------------- @@ -3063,8 +3127,8 @@ Copyright 2022 The Kubernetes Authors. sigs.k8s.io/json == License Type -===Apache-2.0-545d3f23 - +=== BSD-3-Clause--modified-by-Google-545d3f23 +=== Apache-2.0 Files other than internal/golang/* licensed under: @@ -3305,6 +3369,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2009 The Go Authors. All rights reserved. Copyright 2010 The Go Authors. All rights reserved. @@ -3352,8 +3417,11 @@ Copyright 2023 The Kubernetes Authors. sigs.k8s.io/yaml == License Type -===BSD-3-Clause--modified-by-Google-0ceb9ff3 - +=== MIT-b5d30dd5 +=== BSD-3-Clause--modified-by-Google +=== MIT +=== Apache-2.0 +=== Apache-2.0 The MIT License (MIT) Copyright (c) 2014 Sam Ghods @@ -3405,11 +3473,276 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# The forked go-yaml.v3 library under this project is covered by two +different licenses (MIT and Apache): + +#### MIT License #### + +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original MIT license, with the additional +copyright staring in 2011 when the project was ported over: + + apic.go emitterc.go parserc.go readerc.go scannerc.go + writerc.go yamlh.go yamlprivateh.go + +Copyright (c) 2006-2010 Kirill Simonov +Copyright (c) 2006-2011 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +### Apache License ### + +All the remaining project files are covered by the Apache license: + +Copyright (c) 2011-2019 Canonical Ltd + +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 License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +# The forked go-yaml.v2 library under the project is covered by an +Apache license: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + 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 License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + == Copyright +Copyright (c) 2006 Kirill Simonov +Copyright (c) 2006-2010 Kirill Simonov +Copyright (c) 2006-2011 Kirill Simonov +Copyright (c) 2011-2019 Canonical Ltd Copyright (c) 2012 The Go Authors. All rights reserved. Copyright (c) 2014 Sam Ghods +Copyright 2011-2016 Canonical Ltd. Copyright 2013 The Go Authors. All rights reserved. +Copyright 2021 The Kubernetes Authors. +Copyright 2022 The Kubernetes Authors. +Copyright 2023 The Kubernetes Authors. ----------------------------------- Licenses ----------------------------------- @@ -3991,5 +4324,5 @@ the Mozilla Public License, v. 2.0. === ATTRIBUTION-HELPER-GENERATED: -=== Attribution helper version: {Major:0 Minor:11 GitVersion:0.10.0-69-g9cf205e3 GitCommit:9cf205e3ce436f506f0901d927c1e417e72f384f GitTreeState:dirty BuildDate:2022-10-10T19:24:17Z GoVersion:go1.19 Compiler:gc Platform:darwin/amd64} -=== License file based on go.mod with md5 sum: 6ceb0fe8a3df9f31ab5d1f356d3a5068 +=== Attribution helper version: {Major:0 Minor:11 GitVersion: GitCommit: GitTreeState:dirty BuildDate:1970-01-01T00:00:00Z GoVersion:go1.19.3 Compiler:gc Platform:darwin/arm64} +=== License file based on go.mod with md5 sum: 5ba4389f9d7406b21218d714f3f79d86 diff --git a/hack/run_e2e_test.sh b/hack/run_e2e_test.sh index 945c61ce90..4e59d3926d 100755 --- a/hack/run_e2e_test.sh +++ b/hack/run_e2e_test.sh @@ -43,26 +43,54 @@ function set_image_pull_repo_and_delete_namespace_flag () { } function run_e2e_tests_existing_cluster() { - ginkgo -v -progress --trace "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \ - test/e2e/cloud-provider-oci -- \ - --cluster-kubeconfig=${CLUSTER_KUBECONFIG} \ - --cloud-config=${CLOUD_CONFIG} \ - --adlocation=${ADLOCATION} \ - --delete-namespace=${DELETE_NAMESPACE} \ - --image-pull-repo=${IMAGE_PULL_REPO} \ - --cmek-kms-key=${CMEK_KMS_KEY} \ - --mnt-target-id=${MNT_TARGET_ID} \ - --mnt-target-subnet-id=${MNT_TARGET_SUBNET_ID} \ - --mnt-target-compartment-id=${MNT_TARGET_COMPARTMENT_ID} \ - --nsg-ocids=${NSG_OCIDS} \ - --backend-nsg-ocids=${BACKEND_NSG_OCIDS} \ - --reserved-ip=${RESERVED_IP} \ - --architecture=${ARCHITECTURE} \ - --volume-handle=${FSS_VOLUME_HANDLE} \ - --static-snapshot-compartment-id=${STATIC_SNAPSHOT_COMPARTMENT_ID} \ - --enable-parallel-run=${ENABLE_PARALLEL_RUN} \ - --run-uhp-e2e=${RUN_UHP_E2E} \ - --add-oke-system-tags="false" + if [[ -z "${E2E_NODE_COUNT}" ]]; then + E2E_NODE_COUNT=1 + fi + + if [ "$ENABLE_PARALLEL_RUN" == "true" ] || [ "$ENABLE_PARALLEL_RUN" == "TRUE" ]; then + ginkgo -v -p -progress --trace "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \ + test/e2e/cloud-provider-oci -- \ + --cluster-kubeconfig=${CLUSTER_KUBECONFIG} \ + --cloud-config=${CLOUD_CONFIG} \ + --adlocation=${ADLOCATION} \ + --delete-namespace=${DELETE_NAMESPACE} \ + --image-pull-repo=${IMAGE_PULL_REPO} \ + --cmek-kms-key=${CMEK_KMS_KEY} \ + --mnt-target-id=${MNT_TARGET_ID} \ + --mnt-target-subnet-id=${MNT_TARGET_SUBNET_ID} \ + --mnt-target-compartment-id=${MNT_TARGET_COMPARTMENT_ID} \ + --nsg-ocids=${NSG_OCIDS} \ + --backend-nsg-ocids=${BACKEND_NSG_OCIDS} \ + --reserved-ip=${RESERVED_IP} \ + --architecture=${ARCHITECTURE} \ + --volume-handle=${FSS_VOLUME_HANDLE} \ + --static-snapshot-compartment-id=${STATIC_SNAPSHOT_COMPARTMENT_ID} \ + --enable-parallel-run=${ENABLE_PARALLEL_RUN} \ + --run-uhp-e2e=${RUN_UHP_E2E} \ + --add-oke-system-tags="false" + else + ginkgo -v -progress --trace -nodes=${E2E_NODE_COUNT} "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \ + ginkgo -v -p -progress --trace "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \ + test/e2e/cloud-provider-oci -- \ + --cluster-kubeconfig=${CLUSTER_KUBECONFIG} \ + --cloud-config=${CLOUD_CONFIG} \ + --adlocation=${ADLOCATION} \ + --delete-namespace=${DELETE_NAMESPACE} \ + --image-pull-repo=${IMAGE_PULL_REPO} \ + --cmek-kms-key=${CMEK_KMS_KEY} \ + --mnt-target-id=${MNT_TARGET_ID} \ + --mnt-target-subnet-id=${MNT_TARGET_SUBNET_ID} \ + --mnt-target-compartment-id=${MNT_TARGET_COMPARTMENT_ID} \ + --nsg-ocids=${NSG_OCIDS} \ + --backend-nsg-ocids=${BACKEND_NSG_OCIDS} \ + --reserved-ip=${RESERVED_IP} \ + --architecture=${ARCHITECTURE} \ + --volume-handle=${FSS_VOLUME_HANDLE} \ + --static-snapshot-compartment-id=${STATIC_SNAPSHOT_COMPARTMENT_ID} \ + --enable-parallel-run=${ENABLE_PARALLEL_RUN} \ + --run-uhp-e2e=${RUN_UHP_E2E} \ + --add-oke-system-tags="false" + fi retval=$? return $retval } diff --git a/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml b/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml index 6405a59622..2fe6246b62 100644 --- a/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml +++ b/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml @@ -42,7 +42,7 @@ spec: path: /etc/kubernetes containers: - name: oci-cloud-controller-manager - image: ghcr.io/oracle/cloud-provider-oci:v1.28.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.29.0 command: ["/usr/local/bin/oci-cloud-controller-manager"] args: - --cloud-config=/etc/oci/cloud-provider.yaml diff --git a/manifests/container-storage-interface/oci-csi-controller-driver.yaml b/manifests/container-storage-interface/oci-csi-controller-driver.yaml index f50407f92b..fda4d5254b 100644 --- a/manifests/container-storage-interface/oci-csi-controller-driver.yaml +++ b/manifests/container-storage-interface/oci-csi-controller-driver.yaml @@ -22,7 +22,7 @@ spec: node-role.kubernetes.io/control-plane: "" containers: - name: csi-volume-provisioner - image: registry.k8s.io/sig-storage/csi-provisioner:v3.6.0 + image: registry.k8s.io/sig-storage/csi-provisioner:v5.0.1 args: - --csi-address=/var/run/shared-tmpfs/csi.sock - --volume-name-prefix=csi @@ -37,7 +37,7 @@ spec: - mountPath: /var/run/shared-tmpfs name: shared-tmpfs - name: csi-fss-volume-provisioner - image: registry.k8s.io/sig-storage/csi-provisioner:v3.6.0 + image: registry.k8s.io/sig-storage/csi-provisioner:v5.0.1 args: - --csi-address=/var/run/shared-tmpfs/csi-fss.sock - --volume-name-prefix=csi-fss @@ -52,7 +52,7 @@ spec: - mountPath: /var/run/shared-tmpfs name: shared-tmpfs - name: csi-attacher - image: registry.k8s.io/sig-storage/csi-attacher:v4.4.0 + image: registry.k8s.io/sig-storage/csi-attacher:v4.6.1 args: - --csi-address=/var/run/shared-tmpfs/csi.sock - --timeout=120s @@ -65,7 +65,7 @@ spec: - mountPath: /var/run/shared-tmpfs name: shared-tmpfs - name: csi-resizer - image: registry.k8s.io/sig-storage/csi-resizer:v1.9.0 + image: registry.k8s.io/sig-storage/csi-resizer:v1.11.1 args: - --csi-address=/var/run/shared-tmpfs/csi.sock - --leader-election @@ -96,7 +96,7 @@ spec: - --fss-csi-endpoint=unix://var/run/shared-tmpfs/csi-fss.sock command: - /usr/local/bin/oci-csi-controller-driver - image: ghcr.io/oracle/cloud-provider-oci:v1.28.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.29.0 imagePullPolicy: IfNotPresent volumeMounts: - name: config diff --git a/manifests/container-storage-interface/oci-csi-node-driver.yaml b/manifests/container-storage-interface/oci-csi-node-driver.yaml index 68ad946e39..79c0342020 100644 --- a/manifests/container-storage-interface/oci-csi-node-driver.yaml +++ b/manifests/container-storage-interface/oci-csi-node-driver.yaml @@ -117,7 +117,7 @@ spec: fieldPath: spec.nodeName - name: PATH value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/host/usr/bin:/host/sbin - image: ghcr.io/oracle/cloud-provider-oci:v1.28.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.29.0 securityContext: privileged: true volumeMounts: diff --git a/manifests/flexvolume-driver/oci-flexvolume-driver.yaml b/manifests/flexvolume-driver/oci-flexvolume-driver.yaml index 8f2e385895..46209b0a69 100644 --- a/manifests/flexvolume-driver/oci-flexvolume-driver.yaml +++ b/manifests/flexvolume-driver/oci-flexvolume-driver.yaml @@ -40,7 +40,7 @@ spec: secretName: oci-flexvolume-driver containers: - name: oci-flexvolume-driver - image: ghcr.io/oracle/cloud-provider-oci:v1.28.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.29.0 command: ["/usr/local/bin/install.py", "-c", "/tmp/config.yaml"] securityContext: privileged: true @@ -76,7 +76,7 @@ spec: type: DirectoryOrCreate containers: - name: oci-flexvolume-driver - image: ghcr.io/oracle/cloud-provider-oci:v1.28.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.29.0 command: ["/usr/local/bin/install.py"] securityContext: privileged: true diff --git a/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml b/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml index 0486391327..613fbd2ce3 100644 --- a/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml +++ b/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml @@ -35,7 +35,7 @@ spec: secretName: oci-volume-provisioner containers: - name: oci-volume-provisioner - image: ghcr.io/oracle/cloud-provider-oci:v1.28.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.29.0 command: ["/usr/local/bin/oci-volume-provisioner"] env: - name: NODE_NAME diff --git a/manifests/volume-provisioner/oci-volume-provisioner.yaml b/manifests/volume-provisioner/oci-volume-provisioner.yaml index 8a83c9bf79..7c754a50f5 100644 --- a/manifests/volume-provisioner/oci-volume-provisioner.yaml +++ b/manifests/volume-provisioner/oci-volume-provisioner.yaml @@ -35,7 +35,7 @@ spec: secretName: oci-volume-provisioner containers: - name: oci-volume-provisioner - image: ghcr.io/oracle/cloud-provider-oci:v1.28.0 + image: ghcr.io/oracle/cloud-provider-oci:v1.29.0 command: ["/usr/local/bin/oci-volume-provisioner"] env: - name: NODE_NAME diff --git a/pkg/cloudprovider/providers/oci/load_balancer.go b/pkg/cloudprovider/providers/oci/load_balancer.go index d4e8dfbf27..122818f362 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer.go +++ b/pkg/cloudprovider/providers/oci/load_balancer.go @@ -539,6 +539,7 @@ func (cp *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName str dimensionsMap[metrics.ComponentDimension] = lbMetricDimension dimensionsMap[metrics.ResourceOCIDDimension] = lbName metrics.SendMetricData(cp.metricPusher, getMetric(loadBalancerType, Update), time.Since(startTime).Seconds(), dimensionsMap) + return nil, err } lbExists := !client.IsNotFound(err) lbOCID := "" diff --git a/test/e2e/cloud-provider-oci/csi_snapshot_restore.go b/test/e2e/cloud-provider-oci/csi_snapshot_restore.go index 241832f39c..afd8950c61 100644 --- a/test/e2e/cloud-provider-oci/csi_snapshot_restore.go +++ b/test/e2e/cloud-provider-oci/csi_snapshot_restore.go @@ -37,88 +37,88 @@ const ( var _ = Describe("Snapshot Creation and Restore", func() { f := framework.NewBackupFramework("snapshot-restore") - Context("[cloudprovider][storage][csi][snapshot][restore]", func() { - tests := []struct{ - attachmentType string - backupType string - fsType string - }{ - {framework.AttachmentTypeParavirtualized, framework.BackupTypeIncremental, ""}, - {framework.AttachmentTypeParavirtualized, framework.BackupTypeFull, ""}, - {framework.AttachmentTypeISCSI, framework.BackupTypeIncremental, ""}, - {framework.AttachmentTypeISCSI, framework.BackupTypeFull, ""}, - {framework.AttachmentTypeISCSI, framework.BackupTypeIncremental, "xfs"}, - {framework.AttachmentTypeParavirtualized, framework.BackupTypeFull, "ext3"}, - } - for _, entry := range tests { - entry := entry - testName := "Should be able to create and restore " + entry.backupType + " snapshot from " + entry.attachmentType + " volume " - if entry.fsType != "" { - testName += " with " + entry.fsType + " fsType" - } - It(testName, func() { - scParams := map[string]string{framework.AttachmentType: entry.attachmentType} - vscParams := map[string]string{framework.BackupType: entry.backupType} - scParams[framework.FstypeKey] = entry.fsType - testSnapshotAndRestore(f, scParams, vscParams) - }) - } - It("FS should get expanded when a PVC is restored with a lesser size backup (iscsi)", func() { - checkOrInstallCRDs(f) - scParams := map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI} - vscParams := map[string]string{framework.BackupType: framework.BackupTypeFull} - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-snapshot-restore-e2e-tests") - pvcJig.InitialiseSnapClient(f.SnapClientSet) - - scName := f.CreateStorageClassOrFail(f.Namespace.Name, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) - pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) - - _ = pvcJig.NewPodForCSI("pod-original", f.Namespace.Name, pvc.Name, setupF.AdLabel) - - time.Sleep(60 * time.Second) //waiting for pod to up and running - - vscName := f.CreateVolumeSnapshotClassOrFail(f.Namespace.Name, BVDriverName, vscParams, ReclaimPolicyDelete) - vs := pvcJig.CreateAndAwaitVolumeSnapshotOrFail(f.Namespace.Name, vscName, pvc.Name, nil) - - pvcRestore := pvcJig.CreateAndAwaitPVCOrFailSnapshotSource(f.Namespace.Name, framework.MaxVolumeBlock, scName, vs.Name, v1.ClaimPending, nil) - podRestoreName := pvcJig.NewPodForCSI("pod-restored", f.Namespace.Name, pvcRestore.Name, setupF.AdLabel) - - time.Sleep(60 * time.Second) //waiting for pod to up and running - - pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podRestoreName, "99G") - - f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteVolumeSnapshotClass(f.Namespace.Name) - _ = f.DeleteStorageClass(f.Namespace.Name) - }) - It("FS should get expanded when a PVC is restored with a lesser size backup (paravirtualized)", func() { - checkOrInstallCRDs(f) - scParams := map[string]string{framework.AttachmentType: framework.AttachmentTypeParavirtualized} - vscParams := map[string]string{framework.BackupType: framework.BackupTypeFull} - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-snapshot-restore-e2e-tests") - pvcJig.InitialiseSnapClient(f.SnapClientSet) - - scName := f.CreateStorageClassOrFail(f.Namespace.Name, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) - pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) - - _ = pvcJig.NewPodForCSI("pod-original", f.Namespace.Name, pvc.Name, setupF.AdLabel) - - time.Sleep(60 * time.Second) //waiting for pod to up and running - - vscName := f.CreateVolumeSnapshotClassOrFail(f.Namespace.Name, BVDriverName, vscParams, ReclaimPolicyDelete) - vs := pvcJig.CreateAndAwaitVolumeSnapshotOrFail(f.Namespace.Name, vscName, pvc.Name, nil) - - pvcRestore := pvcJig.CreateAndAwaitPVCOrFailSnapshotSource(f.Namespace.Name, framework.MaxVolumeBlock, scName, vs.Name, v1.ClaimPending, nil) - podRestoreName := pvcJig.NewPodForCSI("pod-restored", f.Namespace.Name, pvcRestore.Name, setupF.AdLabel) - - time.Sleep(60 * time.Second) //waiting for pod to up and running - - pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podRestoreName, "99G") - - f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteVolumeSnapshotClass(f.Namespace.Name) - _ = f.DeleteStorageClass(f.Namespace.Name) - }) + Context("[cloudprovider][storage][csi][snapshot][restore][test1]", func() { + //tests := []struct{ + // attachmentType string + // backupType string + // fsType string + //}{ + // {framework.AttachmentTypeParavirtualized, framework.BackupTypeIncremental, ""}, + // {framework.AttachmentTypeParavirtualized, framework.BackupTypeFull, ""}, + // {framework.AttachmentTypeISCSI, framework.BackupTypeIncremental, ""}, + // {framework.AttachmentTypeISCSI, framework.BackupTypeFull, ""}, + // {framework.AttachmentTypeISCSI, framework.BackupTypeIncremental, "xfs"}, + // {framework.AttachmentTypeParavirtualized, framework.BackupTypeFull, "ext3"}, + //} + //for _, entry := range tests { + // entry := entry + // testName := "Should be able to create and restore " + entry.backupType + " snapshot from " + entry.attachmentType + " volume " + // if entry.fsType != "" { + // testName += " with " + entry.fsType + " fsType" + // } + // It(testName, func() { + // scParams := map[string]string{framework.AttachmentType: entry.attachmentType} + // vscParams := map[string]string{framework.BackupType: entry.backupType} + // scParams[framework.FstypeKey] = entry.fsType + // testSnapshotAndRestore(f, scParams, vscParams) + // }) + //} + //It("FS should get expanded when a PVC is restored with a lesser size backup (iscsi)", func() { + // checkOrInstallCRDs(f) + // scParams := map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI} + // vscParams := map[string]string{framework.BackupType: framework.BackupTypeFull} + // pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-snapshot-restore-e2e-tests") + // pvcJig.InitialiseSnapClient(f.SnapClientSet) + // + // scName := f.CreateStorageClassOrFail(f.Namespace.Name, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) + // pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + // + // _ = pvcJig.NewPodForCSI("pod-original", f.Namespace.Name, pvc.Name, setupF.AdLabel) + // + // time.Sleep(60 * time.Second) //waiting for pod to up and running + // + // vscName := f.CreateVolumeSnapshotClassOrFail(f.Namespace.Name, BVDriverName, vscParams, ReclaimPolicyDelete) + // vs := pvcJig.CreateAndAwaitVolumeSnapshotOrFail(f.Namespace.Name, vscName, pvc.Name, nil) + // + // pvcRestore := pvcJig.CreateAndAwaitPVCOrFailSnapshotSource(f.Namespace.Name, framework.MaxVolumeBlock, scName, vs.Name, v1.ClaimPending, nil) + // podRestoreName := pvcJig.NewPodForCSI("pod-restored", f.Namespace.Name, pvcRestore.Name, setupF.AdLabel) + // + // time.Sleep(60 * time.Second) //waiting for pod to up and running + // + // pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podRestoreName, "99G") + // + // f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) + // _ = f.DeleteVolumeSnapshotClass(f.Namespace.Name) + // _ = f.DeleteStorageClass(f.Namespace.Name) + //}) + //It("FS should get expanded when a PVC is restored with a lesser size backup (paravirtualized)", func() { + // checkOrInstallCRDs(f) + // scParams := map[string]string{framework.AttachmentType: framework.AttachmentTypeParavirtualized} + // vscParams := map[string]string{framework.BackupType: framework.BackupTypeFull} + // pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-snapshot-restore-e2e-tests") + // pvcJig.InitialiseSnapClient(f.SnapClientSet) + // + // scName := f.CreateStorageClassOrFail(f.Namespace.Name, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) + // pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + // + // _ = pvcJig.NewPodForCSI("pod-original", f.Namespace.Name, pvc.Name, setupF.AdLabel) + // + // time.Sleep(60 * time.Second) //waiting for pod to up and running + // + // vscName := f.CreateVolumeSnapshotClassOrFail(f.Namespace.Name, BVDriverName, vscParams, ReclaimPolicyDelete) + // vs := pvcJig.CreateAndAwaitVolumeSnapshotOrFail(f.Namespace.Name, vscName, pvc.Name, nil) + // + // pvcRestore := pvcJig.CreateAndAwaitPVCOrFailSnapshotSource(f.Namespace.Name, framework.MaxVolumeBlock, scName, vs.Name, v1.ClaimPending, nil) + // podRestoreName := pvcJig.NewPodForCSI("pod-restored", f.Namespace.Name, pvcRestore.Name, setupF.AdLabel) + // + // time.Sleep(60 * time.Second) //waiting for pod to up and running + // + // pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podRestoreName, "99G") + // + // f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) + // _ = f.DeleteVolumeSnapshotClass(f.Namespace.Name) + // _ = f.DeleteStorageClass(f.Namespace.Name) + //}) It("Should be able to create and restore a snapshot from a backup(static case)", func() { checkOrInstallCRDs(f) scParams := map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI} diff --git a/test/e2e/cloud-provider-oci/csi_volume_creation.go b/test/e2e/cloud-provider-oci/csi_volume_creation.go index 82b03c2c9d..f21743ff7e 100644 --- a/test/e2e/cloud-provider-oci/csi_volume_creation.go +++ b/test/e2e/cloud-provider-oci/csi_volume_creation.go @@ -44,7 +44,6 @@ var _ = Describe("CSI Volume Creation", func() { // volume name duplicate should not exist for _, volume := range volumes { framework.Logf("volume details %v :", volume) - framework.Logf("cluster ocid from setup is %s", setupF.ClusterOcid) if setupF.AddOkeSystemTags && !framework.HasOkeSystemTags(volume.SystemTags) { framework.Failf("the resource %s is expected to have oke system tags", *volume.Id) } diff --git a/test/e2e/cloud-provider-oci/load_balancer.go b/test/e2e/cloud-provider-oci/load_balancer.go index a2c0a0a4da..ecffae5f44 100644 --- a/test/e2e/cloud-provider-oci/load_balancer.go +++ b/test/e2e/cloud-provider-oci/load_balancer.go @@ -16,10 +16,8 @@ package e2e import ( "context" - "encoding/json" "fmt" "net" - "reflect" "strconv" "strings" @@ -27,7 +25,6 @@ import ( . "github.com/onsi/gomega" cloudprovider "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci" sharedfw "github.com/oracle/oci-cloud-controller-manager/test/e2e/framework" - "github.com/oracle/oci-go-sdk/v65/containerengine" "github.com/oracle/oci-go-sdk/v65/core" "go.uber.org/zap" @@ -120,7 +117,6 @@ var _ = Describe("Service [Slow]", func() { loadBalancer, err := f.Client.LoadBalancer(zap.L().Sugar(), lbType, "", nil).GetLoadBalancerByName(ctx, compartmentId, lbName) sharedfw.ExpectNoError(err) sharedfw.Logf("Loadbalancer details %v:", loadBalancer) - sharedfw.Logf("cluster ocid from setup is %s", setupF.ClusterOcid) if setupF.AddOkeSystemTags && !sharedfw.HasOkeSystemTags(loadBalancer.SystemTags) { sharedfw.Failf("Loadbalancer is expected to have the system tags") } diff --git a/test/e2e/cloud-provider-oci/setup.go b/test/e2e/cloud-provider-oci/setup.go index 07f7d616e4..dbd83bb2d0 100644 --- a/test/e2e/cloud-provider-oci/setup.go +++ b/test/e2e/cloud-provider-oci/setup.go @@ -1,12 +1,22 @@ +// Copyright 2020 Oracle and/or its affiliates. All rights reserved. +// +// 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 License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package e2e import ( - "time" - "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" sharedfw "github.com/oracle/oci-cloud-controller-manager/test/e2e/framework" - oke "github.com/oracle/oci-go-sdk/v65/containerengine" ) var setupF *sharedfw.Framework diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 7cc652c651..238ddba901 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -15,26 +15,13 @@ package framework import ( - "context" "flag" "fmt" - "io/ioutil" "math/rand" - "os" - "strconv" "strings" "time" imageutils "k8s.io/kubernetes/test/utils/image" - - "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci/config" - - . "github.com/onsi/gomega" - "github.com/oracle/oci-go-sdk/v65/common" - oke "github.com/oracle/oci-go-sdk/v65/containerengine" - "github.com/oracle/oci-go-sdk/v65/core" - "github.com/oracle/oci-go-sdk/v65/identity" - "gopkg.in/yaml.v2" ) const ( diff --git a/test/e2e/framework/system_tags_util.go b/test/e2e/framework/system_tags_util.go index a71f794750..02719477cc 100644 --- a/test/e2e/framework/system_tags_util.go +++ b/test/e2e/framework/system_tags_util.go @@ -1,3 +1,17 @@ +// Copyright 2020 Oracle and/or its affiliates. All rights reserved. +// +// 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 License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package framework import ( diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/sseReader.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/sseReader.go new file mode 100644 index 0000000000..45e224b426 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/sseReader.go @@ -0,0 +1,92 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +package common + +import ( + "bufio" + "bytes" + "context" + "io" + "net/http" +) + +type SseReader struct { + HttpBody io.ReadCloser + eventScanner bufio.Scanner + OnClose func(r *SseReader) +} + +// InvalidSSEResponseError returned in the case that a nil response body was given +// to NewSSEReader() +type InvalidSSEResponseError struct { +} + +const InvalidResponseErrorMessage = "invalid response struct given to NewSSEReader" + +func (e InvalidSSEResponseError) Error() string { + return InvalidResponseErrorMessage +} + +// NewSSEReader returns an SSE Reader given an sse response +func NewSSEReader(response *http.Response) (*SseReader, error) { + + if response == nil || response.Body == nil { + return nil, InvalidSSEResponseError{} + } + + reader := &SseReader{ + HttpBody: response.Body, + eventScanner: *bufio.NewScanner(response.Body), + OnClose: func(r *SseReader) { r.HttpBody.Close() }, // Default on close function, ensures body is closed after use + } + return reader, nil +} + +// Take the response in bytes and trim it if necessary +func processEvent(e []byte) []byte { + e = bytes.TrimPrefix(e, []byte("data: ")) // Text/event-stream always prefixed with 'data: ' + return e +} + +// ReadNextEvent reads the next event in the stream, return it unmarshalled +func (r *SseReader) ReadNextEvent() (event []byte, err error) { + if r.eventScanner.Scan() { + eventBytes := r.eventScanner.Bytes() + return processEvent(eventBytes), nil + } else { + + // Close out the stream since we are finished reading from it + if r.OnClose != nil { + r.OnClose(r) + } + + err := r.eventScanner.Err() + if err == context.Canceled || err == nil { + err = io.EOF + } + return nil, err + } + +} + +// ReadAllEvents reads all events from the response stream, and processes each with given event handler +func (r *SseReader) ReadAllEvents(eventHandler func(e []byte)) error { + for { + + event, err := r.ReadNextEvent() + + if err != nil { + + if err == io.EOF { + err = nil + } + return err + } + + // Ignore empty events + if len(event) > 0 { + eventHandler(event) + } + } +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/address_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/address_type.go new file mode 100644 index 0000000000..e45a3730be --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/address_type.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "strings" +) + +// AddressTypeEnum Enum with underlying type: string +type AddressTypeEnum string + +// Set of constants representing the allowable values for AddressTypeEnum +const ( + AddressTypePrivateIPv4 AddressTypeEnum = "Private_IPv4" + AddressTypeOracleAllocatedPublicIPv4 AddressTypeEnum = "Oracle_Allocated_Public_IPv4" + AddressTypeByoipIPv4 AddressTypeEnum = "BYOIP_IPv4" + AddressTypeUlaIPv6 AddressTypeEnum = "ULA_IPv6" + AddressTypeOracleAllocatedGuaIPv6 AddressTypeEnum = "Oracle_Allocated_GUA_IPv6" + AddressTypeByoipIPv6 AddressTypeEnum = "BYOIP_IPv6" +) + +var mappingAddressTypeEnum = map[string]AddressTypeEnum{ + "Private_IPv4": AddressTypePrivateIPv4, + "Oracle_Allocated_Public_IPv4": AddressTypeOracleAllocatedPublicIPv4, + "BYOIP_IPv4": AddressTypeByoipIPv4, + "ULA_IPv6": AddressTypeUlaIPv6, + "Oracle_Allocated_GUA_IPv6": AddressTypeOracleAllocatedGuaIPv6, + "BYOIP_IPv6": AddressTypeByoipIPv6, +} + +var mappingAddressTypeEnumLowerCase = map[string]AddressTypeEnum{ + "private_ipv4": AddressTypePrivateIPv4, + "oracle_allocated_public_ipv4": AddressTypeOracleAllocatedPublicIPv4, + "byoip_ipv4": AddressTypeByoipIPv4, + "ula_ipv6": AddressTypeUlaIPv6, + "oracle_allocated_gua_ipv6": AddressTypeOracleAllocatedGuaIPv6, + "byoip_ipv6": AddressTypeByoipIPv6, +} + +// GetAddressTypeEnumValues Enumerates the set of values for AddressTypeEnum +func GetAddressTypeEnumValues() []AddressTypeEnum { + values := make([]AddressTypeEnum, 0) + for _, v := range mappingAddressTypeEnum { + values = append(values, v) + } + return values +} + +// GetAddressTypeEnumStringValues Enumerates the set of values in String for AddressTypeEnum +func GetAddressTypeEnumStringValues() []string { + return []string{ + "Private_IPv4", + "Oracle_Allocated_Public_IPv4", + "BYOIP_IPv4", + "ULA_IPv6", + "Oracle_Allocated_GUA_IPv6", + "BYOIP_IPv6", + } +} + +// GetMappingAddressTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAddressTypeEnum(val string) (AddressTypeEnum, bool) { + enum, ok := mappingAddressTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_update_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_update_instance_platform_config.go new file mode 100644 index 0000000000..03c45206fe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/amd_vm_update_instance_platform_config.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AmdVmUpdateInstancePlatformConfig The platform configuration used when updating a virtual machine instance with the AMD platform. +type AmdVmUpdateInstancePlatformConfig struct { + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` +} + +func (m AmdVmUpdateInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AmdVmUpdateInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AmdVmUpdateInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAmdVmUpdateInstancePlatformConfig AmdVmUpdateInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAmdVmUpdateInstancePlatformConfig + }{ + "AMD_VM", + (MarshalTypeAmdVmUpdateInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_ip_inventory_vcn_overlap_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_ip_inventory_vcn_overlap_details.go new file mode 100644 index 0000000000..b9dce48078 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_ip_inventory_vcn_overlap_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GetIpInventoryVcnOverlapDetails Lists the compartment to find VCN overlap. +type GetIpInventoryVcnOverlapDetails struct { + + // Lists the selected regions. + RegionList []string `mandatory:"true" json:"regionList"` + + // The list of OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartments. + CompartmentList []string `mandatory:"true" json:"compartmentList"` +} + +func (m GetIpInventoryVcnOverlapDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GetIpInventoryVcnOverlapDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_resource_ip_inventory_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_resource_ip_inventory_request_response.go new file mode 100644 index 0000000000..9cea79e8d1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_resource_ip_inventory_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetResourceIpInventoryRequest wrapper for the GetResourceIpInventory operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetResourceIpInventory.go.html to see an example of how to use GetResourceIpInventoryRequest. +type GetResourceIpInventoryRequest struct { + + // Specify the ID of the resource. + DataRequestId *string `mandatory:"true" contributesTo:"path" name:"dataRequestId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetResourceIpInventoryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetResourceIpInventoryRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetResourceIpInventoryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetResourceIpInventoryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetResourceIpInventoryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetResourceIpInventoryResponse wrapper for the GetResourceIpInventory operation +type GetResourceIpInventoryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpInventoryCollection instance + IpInventoryCollection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. A pagination token to get the total number of results available. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` +} + +func (response GetResourceIpInventoryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetResourceIpInventoryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_cidr_utilization_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_cidr_utilization_request_response.go new file mode 100644 index 0000000000..095625a330 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_cidr_utilization_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetSubnetCidrUtilizationRequest wrapper for the GetSubnetCidrUtilization operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetSubnetCidrUtilization.go.html to see an example of how to use GetSubnetCidrUtilizationRequest. +type GetSubnetCidrUtilizationRequest struct { + + // Specify the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetSubnetCidrUtilizationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSubnetCidrUtilizationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetSubnetCidrUtilizationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSubnetCidrUtilizationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetSubnetCidrUtilizationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetSubnetCidrUtilizationResponse wrapper for the GetSubnetCidrUtilization operation +type GetSubnetCidrUtilizationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpInventoryCidrUtilizationCollection instance + IpInventoryCidrUtilizationCollection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. A pagination token to get the total number of results available. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` +} + +func (response GetSubnetCidrUtilizationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSubnetCidrUtilizationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_ip_inventory_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_ip_inventory_request_response.go new file mode 100644 index 0000000000..23664686e3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_subnet_ip_inventory_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetSubnetIpInventoryRequest wrapper for the GetSubnetIpInventory operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetSubnetIpInventory.go.html to see an example of how to use GetSubnetIpInventoryRequest. +type GetSubnetIpInventoryRequest struct { + + // Specify the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"true" contributesTo:"path" name:"subnetId"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetSubnetIpInventoryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetSubnetIpInventoryRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetSubnetIpInventoryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetSubnetIpInventoryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetSubnetIpInventoryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetSubnetIpInventoryResponse wrapper for the GetSubnetIpInventory operation +type GetSubnetIpInventoryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpInventorySubnetResourceCollection instance + IpInventorySubnetResourceCollection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetSubnetIpInventoryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetSubnetIpInventoryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vcn_overlap_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vcn_overlap_request_response.go new file mode 100644 index 0000000000..27f0f49897 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/get_vcn_overlap_request_response.go @@ -0,0 +1,162 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVcnOverlapRequest wrapper for the GetVcnOverlap operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/GetVcnOverlap.go.html to see an example of how to use GetVcnOverlapRequest. +type GetVcnOverlapRequest struct { + + // Specify the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN. + VcnId *string `mandatory:"true" contributesTo:"path" name:"vcnId"` + + // Lists details of the IP Inventory VCN overlap data. + GetVcnOverlapDetails GetIpInventoryVcnOverlapDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations (for example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // may be rejected). + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVcnOverlapRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVcnOverlapRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVcnOverlapRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVcnOverlapRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVcnOverlapRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVcnOverlapResponse wrapper for the GetVcnOverlap operation +type GetVcnOverlapResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpInventoryVcnOverlapCollection instance + IpInventoryVcnOverlapCollection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. A pagination token to get the total number of results available. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.cloud.oracle.com/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // The IpInventory API current state. + LifecycleState GetVcnOverlapLifecycleStateEnum `presentIn:"header" name:"lifecycle-state"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource. + // Use GetWorkRequest (https://docs.cloud.oracle.com/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the resource. + DataRequestId *string `presentIn:"header" name:"data-request-id"` +} + +func (response GetVcnOverlapResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVcnOverlapResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// GetVcnOverlapLifecycleStateEnum Enum with underlying type: string +type GetVcnOverlapLifecycleStateEnum string + +// Set of constants representing the allowable values for GetVcnOverlapLifecycleStateEnum +const ( + GetVcnOverlapLifecycleStateInProgress GetVcnOverlapLifecycleStateEnum = "IN_PROGRESS" + GetVcnOverlapLifecycleStateDone GetVcnOverlapLifecycleStateEnum = "DONE" +) + +var mappingGetVcnOverlapLifecycleStateEnum = map[string]GetVcnOverlapLifecycleStateEnum{ + "IN_PROGRESS": GetVcnOverlapLifecycleStateInProgress, + "DONE": GetVcnOverlapLifecycleStateDone, +} + +var mappingGetVcnOverlapLifecycleStateEnumLowerCase = map[string]GetVcnOverlapLifecycleStateEnum{ + "in_progress": GetVcnOverlapLifecycleStateInProgress, + "done": GetVcnOverlapLifecycleStateDone, +} + +// GetGetVcnOverlapLifecycleStateEnumValues Enumerates the set of values for GetVcnOverlapLifecycleStateEnum +func GetGetVcnOverlapLifecycleStateEnumValues() []GetVcnOverlapLifecycleStateEnum { + values := make([]GetVcnOverlapLifecycleStateEnum, 0) + for _, v := range mappingGetVcnOverlapLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetGetVcnOverlapLifecycleStateEnumStringValues Enumerates the set of values in String for GetVcnOverlapLifecycleStateEnum +func GetGetVcnOverlapLifecycleStateEnumStringValues() []string { + return []string{ + "IN_PROGRESS", + "DONE", + } +} + +// GetMappingGetVcnOverlapLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingGetVcnOverlapLifecycleStateEnum(val string) (GetVcnOverlapLifecycleStateEnum, bool) { + enum, ok := mappingGetVcnOverlapLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_update_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_update_instance_platform_config.go new file mode 100644 index 0000000000..4c29302b21 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/intel_vm_update_instance_platform_config.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IntelVmUpdateInstancePlatformConfig The platform configuration used when updating a virtual machine instance with the Intel platform. +type IntelVmUpdateInstancePlatformConfig struct { + + // Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also + // called simultaneous multithreading (SMT) or Intel Hyper-Threading. + // Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple + // independent threads of execution, to better use the resources and increase the efficiency + // of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which + // can provide higher or more predictable performance for some workloads. + IsSymmetricMultiThreadingEnabled *bool `mandatory:"false" json:"isSymmetricMultiThreadingEnabled"` +} + +func (m IntelVmUpdateInstancePlatformConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IntelVmUpdateInstancePlatformConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m IntelVmUpdateInstancePlatformConfig) MarshalJSON() (buff []byte, e error) { + type MarshalTypeIntelVmUpdateInstancePlatformConfig IntelVmUpdateInstancePlatformConfig + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeIntelVmUpdateInstancePlatformConfig + }{ + "INTEL_VM", + (MarshalTypeIntelVmUpdateInstancePlatformConfig)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_ip_address_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_ip_address_summary.go new file mode 100644 index 0000000000..0d1c168a2a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_ip_address_summary.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InventoryIpAddressSummary Provides the IP address and its corresponding VNIC ID, VNIC name, and DNS hostname. +type InventoryIpAddressSummary struct { + + // The IP address assigned from a subnet. + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VNIC. + VnicId *string `mandatory:"false" json:"vnicId"` + + // The name of the VNIC. + VnicName *string `mandatory:"false" json:"vnicName"` + + // The DNS hostname of the resource assigned with the IP address. + DnsHostName *string `mandatory:"false" json:"dnsHostName"` +} + +func (m InventoryIpAddressSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InventoryIpAddressSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_resource_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_resource_summary.go new file mode 100644 index 0000000000..8aa0a1cdf9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_resource_summary.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InventoryResourceSummary Lists resources and its properties under a given subnet. +type InventoryResourceSummary struct { + + // The name of the resource created. + ResourceName *string `mandatory:"false" json:"resourceName"` + + // Resource types of the resource. + ResourceType InventoryResourceSummaryResourceTypeEnum `mandatory:"false" json:"resourceType,omitempty"` + + // Lists the 'IpAddressCollection' object. + IpAddressCollection []InventoryIpAddressSummary `mandatory:"false" json:"ipAddressCollection"` + + // The region name of the corresponding resource. + Region *string `mandatory:"false" json:"region"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` +} + +func (m InventoryResourceSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InventoryResourceSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingInventoryResourceSummaryResourceTypeEnum(string(m.ResourceType)); !ok && m.ResourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceType: %s. Supported values are: %s.", m.ResourceType, strings.Join(GetInventoryResourceSummaryResourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InventoryResourceSummaryResourceTypeEnum Enum with underlying type: string +type InventoryResourceSummaryResourceTypeEnum string + +// Set of constants representing the allowable values for InventoryResourceSummaryResourceTypeEnum +const ( + InventoryResourceSummaryResourceTypeResource InventoryResourceSummaryResourceTypeEnum = "Resource" +) + +var mappingInventoryResourceSummaryResourceTypeEnum = map[string]InventoryResourceSummaryResourceTypeEnum{ + "Resource": InventoryResourceSummaryResourceTypeResource, +} + +var mappingInventoryResourceSummaryResourceTypeEnumLowerCase = map[string]InventoryResourceSummaryResourceTypeEnum{ + "resource": InventoryResourceSummaryResourceTypeResource, +} + +// GetInventoryResourceSummaryResourceTypeEnumValues Enumerates the set of values for InventoryResourceSummaryResourceTypeEnum +func GetInventoryResourceSummaryResourceTypeEnumValues() []InventoryResourceSummaryResourceTypeEnum { + values := make([]InventoryResourceSummaryResourceTypeEnum, 0) + for _, v := range mappingInventoryResourceSummaryResourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetInventoryResourceSummaryResourceTypeEnumStringValues Enumerates the set of values in String for InventoryResourceSummaryResourceTypeEnum +func GetInventoryResourceSummaryResourceTypeEnumStringValues() []string { + return []string{ + "Resource", + } +} + +// GetMappingInventoryResourceSummaryResourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInventoryResourceSummaryResourceTypeEnum(val string) (InventoryResourceSummaryResourceTypeEnum, bool) { + enum, ok := mappingInventoryResourceSummaryResourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_subnet_cidr_block_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_subnet_cidr_block_summary.go new file mode 100644 index 0000000000..65defaa594 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_subnet_cidr_block_summary.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InventorySubnetCidrBlockSummary Lists CIDRs and utilization within a subnet. +type InventorySubnetCidrBlockSummary struct { + + // The CIDR Prefix within a VCN. + IpCidrBlock *string `mandatory:"false" json:"ipCidrBlock"` + + // The CIDR utilization of a VCN. + Utilization *float32 `mandatory:"false" json:"utilization"` +} + +func (m InventorySubnetCidrBlockSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InventorySubnetCidrBlockSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_subnet_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_subnet_summary.go new file mode 100644 index 0000000000..32cab41202 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_subnet_summary.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InventorySubnetSummary Lists subnet and its associated resources. +type InventorySubnetSummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // Name of the subnet within a VCN. + SubnetName *string `mandatory:"false" json:"subnetName"` + + // Resource types of the subnet. + ResourceType InventorySubnetSummaryResourceTypeEnum `mandatory:"false" json:"resourceType,omitempty"` + + // Lists CIDRs and utilization within the subnet. + InventorySubnetCidrCollection []InventorySubnetCidrBlockSummary `mandatory:"false" json:"inventorySubnetCidrCollection"` + + // DNS domain name of the subnet. + DnsDomainName *string `mandatory:"false" json:"dnsDomainName"` + + // Region name of the subnet. + Region *string `mandatory:"false" json:"region"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Lists the `ResourceCollection` object. + InventoryResourceSummary []InventoryResourceSummary `mandatory:"false" json:"inventoryResourceSummary"` +} + +func (m InventorySubnetSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InventorySubnetSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingInventorySubnetSummaryResourceTypeEnum(string(m.ResourceType)); !ok && m.ResourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceType: %s. Supported values are: %s.", m.ResourceType, strings.Join(GetInventorySubnetSummaryResourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InventorySubnetSummaryResourceTypeEnum Enum with underlying type: string +type InventorySubnetSummaryResourceTypeEnum string + +// Set of constants representing the allowable values for InventorySubnetSummaryResourceTypeEnum +const ( + InventorySubnetSummaryResourceTypeSubnet InventorySubnetSummaryResourceTypeEnum = "Subnet" +) + +var mappingInventorySubnetSummaryResourceTypeEnum = map[string]InventorySubnetSummaryResourceTypeEnum{ + "Subnet": InventorySubnetSummaryResourceTypeSubnet, +} + +var mappingInventorySubnetSummaryResourceTypeEnumLowerCase = map[string]InventorySubnetSummaryResourceTypeEnum{ + "subnet": InventorySubnetSummaryResourceTypeSubnet, +} + +// GetInventorySubnetSummaryResourceTypeEnumValues Enumerates the set of values for InventorySubnetSummaryResourceTypeEnum +func GetInventorySubnetSummaryResourceTypeEnumValues() []InventorySubnetSummaryResourceTypeEnum { + values := make([]InventorySubnetSummaryResourceTypeEnum, 0) + for _, v := range mappingInventorySubnetSummaryResourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetInventorySubnetSummaryResourceTypeEnumStringValues Enumerates the set of values in String for InventorySubnetSummaryResourceTypeEnum +func GetInventorySubnetSummaryResourceTypeEnumStringValues() []string { + return []string{ + "Subnet", + } +} + +// GetMappingInventorySubnetSummaryResourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInventorySubnetSummaryResourceTypeEnum(val string) (InventorySubnetSummaryResourceTypeEnum, bool) { + enum, ok := mappingInventorySubnetSummaryResourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_vcn_cidr_block_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_vcn_cidr_block_summary.go new file mode 100644 index 0000000000..3f3dbe35be --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_vcn_cidr_block_summary.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InventoryVcnCidrBlockSummary Lists the CIDRs and utilization within a VCN. +type InventoryVcnCidrBlockSummary struct { + + // The CIDR prefix within a VCN. + IpCidrBlock *string `mandatory:"false" json:"ipCidrBlock"` + + // The CIDR utilization of a VCN. + Utilization *float32 `mandatory:"false" json:"utilization"` +} + +func (m InventoryVcnCidrBlockSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InventoryVcnCidrBlockSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_vcn_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_vcn_summary.go new file mode 100644 index 0000000000..565ab4e021 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/inventory_vcn_summary.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InventoryVcnSummary Provides the summary of a VCN's IP Inventory data under specified compartments. +type InventoryVcnSummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN . + VcnId *string `mandatory:"false" json:"vcnId"` + + // Name of the VCN. + VcnName *string `mandatory:"false" json:"vcnName"` + + // Resource types of the VCN. + ResourceType InventoryVcnSummaryResourceTypeEnum `mandatory:"false" json:"resourceType,omitempty"` + + // Lists `InventoryVcnCidrBlockSummary` objects. + InventoryVcnCidrBlockCollection []InventoryVcnCidrBlockSummary `mandatory:"false" json:"inventoryVcnCidrBlockCollection"` + + // DNS domain name of the VCN. + DnsDomainName *string `mandatory:"false" json:"dnsDomainName"` + + // Region name of the VCN. + Region *string `mandatory:"false" json:"region"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Lists `Subnetcollection` objects + InventorySubnetcollection []InventorySubnetSummary `mandatory:"false" json:"inventorySubnetcollection"` +} + +func (m InventoryVcnSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InventoryVcnSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingInventoryVcnSummaryResourceTypeEnum(string(m.ResourceType)); !ok && m.ResourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceType: %s. Supported values are: %s.", m.ResourceType, strings.Join(GetInventoryVcnSummaryResourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InventoryVcnSummaryResourceTypeEnum Enum with underlying type: string +type InventoryVcnSummaryResourceTypeEnum string + +// Set of constants representing the allowable values for InventoryVcnSummaryResourceTypeEnum +const ( + InventoryVcnSummaryResourceTypeVcn InventoryVcnSummaryResourceTypeEnum = "VCN" +) + +var mappingInventoryVcnSummaryResourceTypeEnum = map[string]InventoryVcnSummaryResourceTypeEnum{ + "VCN": InventoryVcnSummaryResourceTypeVcn, +} + +var mappingInventoryVcnSummaryResourceTypeEnumLowerCase = map[string]InventoryVcnSummaryResourceTypeEnum{ + "vcn": InventoryVcnSummaryResourceTypeVcn, +} + +// GetInventoryVcnSummaryResourceTypeEnumValues Enumerates the set of values for InventoryVcnSummaryResourceTypeEnum +func GetInventoryVcnSummaryResourceTypeEnumValues() []InventoryVcnSummaryResourceTypeEnum { + values := make([]InventoryVcnSummaryResourceTypeEnum, 0) + for _, v := range mappingInventoryVcnSummaryResourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetInventoryVcnSummaryResourceTypeEnumStringValues Enumerates the set of values in String for InventoryVcnSummaryResourceTypeEnum +func GetInventoryVcnSummaryResourceTypeEnumStringValues() []string { + return []string{ + "VCN", + } +} + +// GetMappingInventoryVcnSummaryResourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingInventoryVcnSummaryResourceTypeEnum(val string) (InventoryVcnSummaryResourceTypeEnum, bool) { + enum, ok := mappingInventoryVcnSummaryResourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_cidr_utilization_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_cidr_utilization_collection.go new file mode 100644 index 0000000000..6d8b9d3654 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_cidr_utilization_collection.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpInventoryCidrUtilizationCollection The IP Inventory CIDR utilization details of a subnet. +type IpInventoryCidrUtilizationCollection struct { + + // Specifies the count for the number of results for the response. + Count *int `mandatory:"false" json:"count"` + + // The Timestamp of the latest update from the database in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + LastUpdatedTimestamp *common.SDKTime `mandatory:"false" json:"lastUpdatedTimestamp"` + + // Lists 'IpInventoryCidrUtilizationSummary` object. + IpInventoryCidrUtilizationSummary []IpInventoryCidrUtilizationSummary `mandatory:"false" json:"ipInventoryCidrUtilizationSummary"` + + // Indicates the status of the data. + Message *string `mandatory:"false" json:"message"` + + // Compartment of the subnet. + CompartmentId *string `mandatory:"false" json:"compartmentId"` +} + +func (m IpInventoryCidrUtilizationCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpInventoryCidrUtilizationCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_cidr_utilization_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_cidr_utilization_summary.go new file mode 100644 index 0000000000..882efc8f1f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_cidr_utilization_summary.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpInventoryCidrUtilizationSummary The CIDR utilization details of a subnet. +type IpInventoryCidrUtilizationSummary struct { + + // The CIDR range of a subnet. + Cidr *string `mandatory:"false" json:"cidr"` + + // The CIDR utilisation of a subnet. + Utilization *float32 `mandatory:"false" json:"utilization"` + + // Address type of the CIDR within a subnet. + AddressType *string `mandatory:"false" json:"addressType"` +} + +func (m IpInventoryCidrUtilizationSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpInventoryCidrUtilizationSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_collection.go new file mode 100644 index 0000000000..8908f5deca --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_collection.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpInventoryCollection The results returned by a `ListIpInventory` operation. +type IpInventoryCollection struct { + + // Species the count for the number of results for the response. + Count *int `mandatory:"false" json:"count"` + + // The timestamp of the latest update from the database in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + LastUpdatedTimestamp *common.SDKTime `mandatory:"false" json:"lastUpdatedTimestamp"` + + // The number of compartments per compartments per tenant. + CompartmentsPerTenant *int64 `mandatory:"false" json:"compartmentsPerTenant"` + + // Lists `IpInventoryVcnSummary` objects. + InventoryVcnCollection []InventoryVcnSummary `mandatory:"false" json:"inventoryVcnCollection"` + + // Indicates the status of the data. + Message *string `mandatory:"false" json:"message"` +} + +func (m IpInventoryCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpInventoryCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_subnet_resource_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_subnet_resource_collection.go new file mode 100644 index 0000000000..340e6931af --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_subnet_resource_collection.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpInventorySubnetResourceCollection The results returned by a `ListIpInventorySubnet` operation. +type IpInventorySubnetResourceCollection struct { + + // Specifies the count for the number of results for the response. + Count *int `mandatory:"false" json:"count"` + + // The Timestamp of the latest update from the database in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + LastUpdatedTimestamp *common.SDKTime `mandatory:"false" json:"lastUpdatedTimestamp"` + + // Lists `SubnetResourceSummary` objects. + IpInventorySubnetResourceSummary []IpInventorySubnetResourceSummary `mandatory:"false" json:"ipInventorySubnetResourceSummary"` + + // Indicates the status of the data. + Message *string `mandatory:"false" json:"message"` + + // The compartment of the subnet. + CompartmentId *string `mandatory:"false" json:"compartmentId"` +} + +func (m IpInventorySubnetResourceCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpInventorySubnetResourceCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_subnet_resource_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_subnet_resource_summary.go new file mode 100644 index 0000000000..cf65ab833e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_subnet_resource_summary.go @@ -0,0 +1,254 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpInventorySubnetResourceSummary Provides the IP Inventory details of a subnet and its associated resources. +type IpInventorySubnetResourceSummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the IP address. + IpId *string `mandatory:"false" json:"ipId"` + + // Lists the allocated private IP address. + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // Lifetime of the allocated private IP address. + IpAddressLifetime IpInventorySubnetResourceSummaryIpAddressLifetimeEnum `mandatory:"false" json:"ipAddressLifetime,omitempty"` + + // The address range the IP address is assigned from. + ParentCidr *string `mandatory:"false" json:"parentCidr"` + + // Associated public IP address for the private IP address. + AssociatedPublicIp *string `mandatory:"false" json:"associatedPublicIp"` + + // Lifetime of the assigned public IP address. + PublicIpLifetime IpInventorySubnetResourceSummaryPublicIpLifetimeEnum `mandatory:"false" json:"publicIpLifetime,omitempty"` + + // Public IP address Pool the IP address is allocated from. + AssociatedPublicIpPool IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum `mandatory:"false" json:"associatedPublicIpPool,omitempty"` + + // DNS hostname of the IP address. + DnsHostName *string `mandatory:"false" json:"dnsHostName"` + + // Name of the created resource. + AssignedResourceName *string `mandatory:"false" json:"assignedResourceName"` + + // Type of the resource. + AssignedResourceType IpInventorySubnetResourceSummaryAssignedResourceTypeEnum `mandatory:"false" json:"assignedResourceType,omitempty"` + + // Address type of the allocated private IP address. + AddressType *string `mandatory:"false" json:"addressType"` + + // Assigned time of the private IP address. + AssignedTime *common.SDKTime `mandatory:"false" json:"assignedTime"` +} + +func (m IpInventorySubnetResourceSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpInventorySubnetResourceSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingIpInventorySubnetResourceSummaryIpAddressLifetimeEnum(string(m.IpAddressLifetime)); !ok && m.IpAddressLifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IpAddressLifetime: %s. Supported values are: %s.", m.IpAddressLifetime, strings.Join(GetIpInventorySubnetResourceSummaryIpAddressLifetimeEnumStringValues(), ","))) + } + if _, ok := GetMappingIpInventorySubnetResourceSummaryPublicIpLifetimeEnum(string(m.PublicIpLifetime)); !ok && m.PublicIpLifetime != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PublicIpLifetime: %s. Supported values are: %s.", m.PublicIpLifetime, strings.Join(GetIpInventorySubnetResourceSummaryPublicIpLifetimeEnumStringValues(), ","))) + } + if _, ok := GetMappingIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum(string(m.AssociatedPublicIpPool)); !ok && m.AssociatedPublicIpPool != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AssociatedPublicIpPool: %s. Supported values are: %s.", m.AssociatedPublicIpPool, strings.Join(GetIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnumStringValues(), ","))) + } + if _, ok := GetMappingIpInventorySubnetResourceSummaryAssignedResourceTypeEnum(string(m.AssignedResourceType)); !ok && m.AssignedResourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AssignedResourceType: %s. Supported values are: %s.", m.AssignedResourceType, strings.Join(GetIpInventorySubnetResourceSummaryAssignedResourceTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// IpInventorySubnetResourceSummaryIpAddressLifetimeEnum Enum with underlying type: string +type IpInventorySubnetResourceSummaryIpAddressLifetimeEnum string + +// Set of constants representing the allowable values for IpInventorySubnetResourceSummaryIpAddressLifetimeEnum +const ( + IpInventorySubnetResourceSummaryIpAddressLifetimeEphemeral IpInventorySubnetResourceSummaryIpAddressLifetimeEnum = "Ephemeral" + IpInventorySubnetResourceSummaryIpAddressLifetimeReserved IpInventorySubnetResourceSummaryIpAddressLifetimeEnum = "Reserved" +) + +var mappingIpInventorySubnetResourceSummaryIpAddressLifetimeEnum = map[string]IpInventorySubnetResourceSummaryIpAddressLifetimeEnum{ + "Ephemeral": IpInventorySubnetResourceSummaryIpAddressLifetimeEphemeral, + "Reserved": IpInventorySubnetResourceSummaryIpAddressLifetimeReserved, +} + +var mappingIpInventorySubnetResourceSummaryIpAddressLifetimeEnumLowerCase = map[string]IpInventorySubnetResourceSummaryIpAddressLifetimeEnum{ + "ephemeral": IpInventorySubnetResourceSummaryIpAddressLifetimeEphemeral, + "reserved": IpInventorySubnetResourceSummaryIpAddressLifetimeReserved, +} + +// GetIpInventorySubnetResourceSummaryIpAddressLifetimeEnumValues Enumerates the set of values for IpInventorySubnetResourceSummaryIpAddressLifetimeEnum +func GetIpInventorySubnetResourceSummaryIpAddressLifetimeEnumValues() []IpInventorySubnetResourceSummaryIpAddressLifetimeEnum { + values := make([]IpInventorySubnetResourceSummaryIpAddressLifetimeEnum, 0) + for _, v := range mappingIpInventorySubnetResourceSummaryIpAddressLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetIpInventorySubnetResourceSummaryIpAddressLifetimeEnumStringValues Enumerates the set of values in String for IpInventorySubnetResourceSummaryIpAddressLifetimeEnum +func GetIpInventorySubnetResourceSummaryIpAddressLifetimeEnumStringValues() []string { + return []string{ + "Ephemeral", + "Reserved", + } +} + +// GetMappingIpInventorySubnetResourceSummaryIpAddressLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpInventorySubnetResourceSummaryIpAddressLifetimeEnum(val string) (IpInventorySubnetResourceSummaryIpAddressLifetimeEnum, bool) { + enum, ok := mappingIpInventorySubnetResourceSummaryIpAddressLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// IpInventorySubnetResourceSummaryPublicIpLifetimeEnum Enum with underlying type: string +type IpInventorySubnetResourceSummaryPublicIpLifetimeEnum string + +// Set of constants representing the allowable values for IpInventorySubnetResourceSummaryPublicIpLifetimeEnum +const ( + IpInventorySubnetResourceSummaryPublicIpLifetimeEphemeral IpInventorySubnetResourceSummaryPublicIpLifetimeEnum = "Ephemeral" + IpInventorySubnetResourceSummaryPublicIpLifetimeReserved IpInventorySubnetResourceSummaryPublicIpLifetimeEnum = "Reserved" +) + +var mappingIpInventorySubnetResourceSummaryPublicIpLifetimeEnum = map[string]IpInventorySubnetResourceSummaryPublicIpLifetimeEnum{ + "Ephemeral": IpInventorySubnetResourceSummaryPublicIpLifetimeEphemeral, + "Reserved": IpInventorySubnetResourceSummaryPublicIpLifetimeReserved, +} + +var mappingIpInventorySubnetResourceSummaryPublicIpLifetimeEnumLowerCase = map[string]IpInventorySubnetResourceSummaryPublicIpLifetimeEnum{ + "ephemeral": IpInventorySubnetResourceSummaryPublicIpLifetimeEphemeral, + "reserved": IpInventorySubnetResourceSummaryPublicIpLifetimeReserved, +} + +// GetIpInventorySubnetResourceSummaryPublicIpLifetimeEnumValues Enumerates the set of values for IpInventorySubnetResourceSummaryPublicIpLifetimeEnum +func GetIpInventorySubnetResourceSummaryPublicIpLifetimeEnumValues() []IpInventorySubnetResourceSummaryPublicIpLifetimeEnum { + values := make([]IpInventorySubnetResourceSummaryPublicIpLifetimeEnum, 0) + for _, v := range mappingIpInventorySubnetResourceSummaryPublicIpLifetimeEnum { + values = append(values, v) + } + return values +} + +// GetIpInventorySubnetResourceSummaryPublicIpLifetimeEnumStringValues Enumerates the set of values in String for IpInventorySubnetResourceSummaryPublicIpLifetimeEnum +func GetIpInventorySubnetResourceSummaryPublicIpLifetimeEnumStringValues() []string { + return []string{ + "Ephemeral", + "Reserved", + } +} + +// GetMappingIpInventorySubnetResourceSummaryPublicIpLifetimeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpInventorySubnetResourceSummaryPublicIpLifetimeEnum(val string) (IpInventorySubnetResourceSummaryPublicIpLifetimeEnum, bool) { + enum, ok := mappingIpInventorySubnetResourceSummaryPublicIpLifetimeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum Enum with underlying type: string +type IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum string + +// Set of constants representing the allowable values for IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum +const ( + IpInventorySubnetResourceSummaryAssociatedPublicIpPoolOracle IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum = "ORACLE" + IpInventorySubnetResourceSummaryAssociatedPublicIpPoolByoip IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum = "BYOIP" +) + +var mappingIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum = map[string]IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum{ + "ORACLE": IpInventorySubnetResourceSummaryAssociatedPublicIpPoolOracle, + "BYOIP": IpInventorySubnetResourceSummaryAssociatedPublicIpPoolByoip, +} + +var mappingIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnumLowerCase = map[string]IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum{ + "oracle": IpInventorySubnetResourceSummaryAssociatedPublicIpPoolOracle, + "byoip": IpInventorySubnetResourceSummaryAssociatedPublicIpPoolByoip, +} + +// GetIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnumValues Enumerates the set of values for IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum +func GetIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnumValues() []IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum { + values := make([]IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum, 0) + for _, v := range mappingIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum { + values = append(values, v) + } + return values +} + +// GetIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnumStringValues Enumerates the set of values in String for IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum +func GetIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnumStringValues() []string { + return []string{ + "ORACLE", + "BYOIP", + } +} + +// GetMappingIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum(val string) (IpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnum, bool) { + enum, ok := mappingIpInventorySubnetResourceSummaryAssociatedPublicIpPoolEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// IpInventorySubnetResourceSummaryAssignedResourceTypeEnum Enum with underlying type: string +type IpInventorySubnetResourceSummaryAssignedResourceTypeEnum string + +// Set of constants representing the allowable values for IpInventorySubnetResourceSummaryAssignedResourceTypeEnum +const ( + IpInventorySubnetResourceSummaryAssignedResourceTypeResource IpInventorySubnetResourceSummaryAssignedResourceTypeEnum = "Resource" +) + +var mappingIpInventorySubnetResourceSummaryAssignedResourceTypeEnum = map[string]IpInventorySubnetResourceSummaryAssignedResourceTypeEnum{ + "Resource": IpInventorySubnetResourceSummaryAssignedResourceTypeResource, +} + +var mappingIpInventorySubnetResourceSummaryAssignedResourceTypeEnumLowerCase = map[string]IpInventorySubnetResourceSummaryAssignedResourceTypeEnum{ + "resource": IpInventorySubnetResourceSummaryAssignedResourceTypeResource, +} + +// GetIpInventorySubnetResourceSummaryAssignedResourceTypeEnumValues Enumerates the set of values for IpInventorySubnetResourceSummaryAssignedResourceTypeEnum +func GetIpInventorySubnetResourceSummaryAssignedResourceTypeEnumValues() []IpInventorySubnetResourceSummaryAssignedResourceTypeEnum { + values := make([]IpInventorySubnetResourceSummaryAssignedResourceTypeEnum, 0) + for _, v := range mappingIpInventorySubnetResourceSummaryAssignedResourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetIpInventorySubnetResourceSummaryAssignedResourceTypeEnumStringValues Enumerates the set of values in String for IpInventorySubnetResourceSummaryAssignedResourceTypeEnum +func GetIpInventorySubnetResourceSummaryAssignedResourceTypeEnumStringValues() []string { + return []string{ + "Resource", + } +} + +// GetMappingIpInventorySubnetResourceSummaryAssignedResourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingIpInventorySubnetResourceSummaryAssignedResourceTypeEnum(val string) (IpInventorySubnetResourceSummaryAssignedResourceTypeEnum, bool) { + enum, ok := mappingIpInventorySubnetResourceSummaryAssignedResourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_vcn_overlap_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_vcn_overlap_collection.go new file mode 100644 index 0000000000..283bd81cf6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_vcn_overlap_collection.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpInventoryVcnOverlapCollection The details of the overlapping VCNs and compartments. +type IpInventoryVcnOverlapCollection struct { + + // The timestamp of the latest update from the database in the format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + LastUpdatedTimestamp *common.SDKTime `mandatory:"false" json:"lastUpdatedTimestamp"` + + // Lists `IpInventoryVcnOverlapSummary` object. + IpInventoryVcnOverlapSummary []IpInventoryVcnOverlapSummary `mandatory:"false" json:"ipInventoryVcnOverlapSummary"` + + // Indicates the status of the data. + Message *string `mandatory:"false" json:"message"` + + // The overlap count for the given VCN and compartments. + OverlapCount *int `mandatory:"false" json:"overlapCount"` +} + +func (m IpInventoryVcnOverlapCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpInventoryVcnOverlapCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_vcn_overlap_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_vcn_overlap_summary.go new file mode 100644 index 0000000000..4a0900792b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ip_inventory_vcn_overlap_summary.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpInventoryVcnOverlapSummary Provides the VCN overlap details. +type IpInventoryVcnOverlapSummary struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the VCN . + OverlappingVcnId *string `mandatory:"false" json:"overlappingVcnId"` + + // Name of the overlapping VCN. + OverlappingVcnName *string `mandatory:"false" json:"overlappingVcnName"` + + // The overlapping CIDR prefix. + OverlappingCidr *string `mandatory:"false" json:"overlappingCidr"` + + // CIDR prefix of the VCN. + Cidr *string `mandatory:"false" json:"cidr"` +} + +func (m IpInventoryVcnOverlapSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpInventoryVcnOverlapSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/ipam.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipam.go new file mode 100644 index 0000000000..82372e8cc2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/ipam.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Ipam An IPAM refers to a group of VCNs, subnets, IP resources +// +// and its related properties. +type Ipam struct { + + // Placeholder for description + Placeholder *string `mandatory:"false" json:"placeholder"` +} + +func (m Ipam) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Ipam) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_attach_i_scsi_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_attach_i_scsi_volume_details.go new file mode 100644 index 0000000000..3ffcdf7478 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_attach_i_scsi_volume_details.go @@ -0,0 +1,169 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchAttachIScsiVolumeDetails Details specific to ISCSI type volume attachments. +type LaunchAttachIScsiVolumeDetails struct { + + // The device name. To retrieve a list of devices for a given instance, see ListInstanceDevices. + Device *string `mandatory:"false" json:"device"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Whether the attachment was created in read-only mode. + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + IsShareable *bool `mandatory:"false" json:"isShareable"` + + // The OCID of the volume. If CreateVolumeDetails is specified, this field must be omitted from the request. + VolumeId *string `mandatory:"false" json:"volumeId"` + + LaunchCreateVolumeDetails LaunchCreateVolumeDetails `mandatory:"false" json:"launchCreateVolumeDetails"` + + // Whether to use CHAP authentication for the volume attachment. Defaults to false. + UseChap *bool `mandatory:"false" json:"useChap"` + + // Whether to enable Oracle Cloud Agent to perform the iSCSI login and logout commands after the volume attach or detach operations for non multipath-enabled iSCSI attachments. + IsAgentAutoIscsiLoginEnabled *bool `mandatory:"false" json:"isAgentAutoIscsiLoginEnabled"` + + // Refer the top-level definition of encryptionInTransitType. + // The default value is NONE. + EncryptionInTransitType EncryptionInTransitTypeEnum `mandatory:"false" json:"encryptionInTransitType,omitempty"` +} + +// GetDevice returns Device +func (m LaunchAttachIScsiVolumeDetails) GetDevice() *string { + return m.Device +} + +// GetDisplayName returns DisplayName +func (m LaunchAttachIScsiVolumeDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetIsReadOnly returns IsReadOnly +func (m LaunchAttachIScsiVolumeDetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetIsShareable returns IsShareable +func (m LaunchAttachIScsiVolumeDetails) GetIsShareable() *bool { + return m.IsShareable +} + +// GetVolumeId returns VolumeId +func (m LaunchAttachIScsiVolumeDetails) GetVolumeId() *string { + return m.VolumeId +} + +// GetLaunchCreateVolumeDetails returns LaunchCreateVolumeDetails +func (m LaunchAttachIScsiVolumeDetails) GetLaunchCreateVolumeDetails() LaunchCreateVolumeDetails { + return m.LaunchCreateVolumeDetails +} + +func (m LaunchAttachIScsiVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LaunchAttachIScsiVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingEncryptionInTransitTypeEnum(string(m.EncryptionInTransitType)); !ok && m.EncryptionInTransitType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for EncryptionInTransitType: %s. Supported values are: %s.", m.EncryptionInTransitType, strings.Join(GetEncryptionInTransitTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m LaunchAttachIScsiVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeLaunchAttachIScsiVolumeDetails LaunchAttachIScsiVolumeDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeLaunchAttachIScsiVolumeDetails + }{ + "iscsi", + (MarshalTypeLaunchAttachIScsiVolumeDetails)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *LaunchAttachIScsiVolumeDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Device *string `json:"device"` + DisplayName *string `json:"displayName"` + IsReadOnly *bool `json:"isReadOnly"` + IsShareable *bool `json:"isShareable"` + VolumeId *string `json:"volumeId"` + LaunchCreateVolumeDetails launchcreatevolumedetails `json:"launchCreateVolumeDetails"` + UseChap *bool `json:"useChap"` + EncryptionInTransitType EncryptionInTransitTypeEnum `json:"encryptionInTransitType"` + IsAgentAutoIscsiLoginEnabled *bool `json:"isAgentAutoIscsiLoginEnabled"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Device = model.Device + + m.DisplayName = model.DisplayName + + m.IsReadOnly = model.IsReadOnly + + m.IsShareable = model.IsShareable + + m.VolumeId = model.VolumeId + + nn, e = model.LaunchCreateVolumeDetails.UnmarshalPolymorphicJSON(model.LaunchCreateVolumeDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.LaunchCreateVolumeDetails = nn.(LaunchCreateVolumeDetails) + } else { + m.LaunchCreateVolumeDetails = nil + } + + m.UseChap = model.UseChap + + m.EncryptionInTransitType = model.EncryptionInTransitType + + m.IsAgentAutoIscsiLoginEnabled = model.IsAgentAutoIscsiLoginEnabled + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_attach_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_attach_volume_details.go new file mode 100644 index 0000000000..f9647ddf51 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_attach_volume_details.go @@ -0,0 +1,146 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchAttachVolumeDetails The details of the volume to attach. +type LaunchAttachVolumeDetails interface { + + // The device name. To retrieve a list of devices for a given instance, see ListInstanceDevices. + GetDevice() *string + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + GetDisplayName() *string + + // Whether the attachment was created in read-only mode. + GetIsReadOnly() *bool + + // Whether the attachment should be created in shareable mode. If an attachment + // is created in shareable mode, then other instances can attach the same volume, provided + // that they also create their attachments in shareable mode. Only certain volume types can + // be attached in shareable mode. Defaults to false if not specified. + GetIsShareable() *bool + + // The OCID of the volume. If CreateVolumeDetails is specified, this field must be omitted from the request. + GetVolumeId() *string + + GetLaunchCreateVolumeDetails() LaunchCreateVolumeDetails +} + +type launchattachvolumedetails struct { + JsonData []byte + Device *string `mandatory:"false" json:"device"` + DisplayName *string `mandatory:"false" json:"displayName"` + IsReadOnly *bool `mandatory:"false" json:"isReadOnly"` + IsShareable *bool `mandatory:"false" json:"isShareable"` + VolumeId *string `mandatory:"false" json:"volumeId"` + LaunchCreateVolumeDetails launchcreatevolumedetails `mandatory:"false" json:"launchCreateVolumeDetails"` + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *launchattachvolumedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerlaunchattachvolumedetails launchattachvolumedetails + s := struct { + Model Unmarshalerlaunchattachvolumedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Device = s.Model.Device + m.DisplayName = s.Model.DisplayName + m.IsReadOnly = s.Model.IsReadOnly + m.IsShareable = s.Model.IsShareable + m.VolumeId = s.Model.VolumeId + m.LaunchCreateVolumeDetails = s.Model.LaunchCreateVolumeDetails + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *launchattachvolumedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "iscsi": + mm := LaunchAttachIScsiVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for LaunchAttachVolumeDetails: %s.", m.Type) + return *m, nil + } +} + +// GetDevice returns Device +func (m launchattachvolumedetails) GetDevice() *string { + return m.Device +} + +// GetDisplayName returns DisplayName +func (m launchattachvolumedetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetIsReadOnly returns IsReadOnly +func (m launchattachvolumedetails) GetIsReadOnly() *bool { + return m.IsReadOnly +} + +// GetIsShareable returns IsShareable +func (m launchattachvolumedetails) GetIsShareable() *bool { + return m.IsShareable +} + +// GetVolumeId returns VolumeId +func (m launchattachvolumedetails) GetVolumeId() *string { + return m.VolumeId +} + +// GetLaunchCreateVolumeDetails returns LaunchCreateVolumeDetails +func (m launchattachvolumedetails) GetLaunchCreateVolumeDetails() launchcreatevolumedetails { + return m.LaunchCreateVolumeDetails +} + +func (m launchattachvolumedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m launchattachvolumedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_create_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_create_volume_details.go new file mode 100644 index 0000000000..31e6a0c04e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_create_volume_details.go @@ -0,0 +1,121 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchCreateVolumeDetails Define a volume that will be created and attached or attached to an instance on creation. +type LaunchCreateVolumeDetails interface { +} + +type launchcreatevolumedetails struct { + JsonData []byte + VolumeCreationType string `json:"volumeCreationType"` +} + +// UnmarshalJSON unmarshals json +func (m *launchcreatevolumedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerlaunchcreatevolumedetails launchcreatevolumedetails + s := struct { + Model Unmarshalerlaunchcreatevolumedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.VolumeCreationType = s.Model.VolumeCreationType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *launchcreatevolumedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.VolumeCreationType { + case "ATTRIBUTES": + mm := LaunchCreateVolumeFromAttributes{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for LaunchCreateVolumeDetails: %s.", m.VolumeCreationType) + return *m, nil + } +} + +func (m launchcreatevolumedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m launchcreatevolumedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// LaunchCreateVolumeDetailsVolumeCreationTypeEnum Enum with underlying type: string +type LaunchCreateVolumeDetailsVolumeCreationTypeEnum string + +// Set of constants representing the allowable values for LaunchCreateVolumeDetailsVolumeCreationTypeEnum +const ( + LaunchCreateVolumeDetailsVolumeCreationTypeAttributes LaunchCreateVolumeDetailsVolumeCreationTypeEnum = "ATTRIBUTES" +) + +var mappingLaunchCreateVolumeDetailsVolumeCreationTypeEnum = map[string]LaunchCreateVolumeDetailsVolumeCreationTypeEnum{ + "ATTRIBUTES": LaunchCreateVolumeDetailsVolumeCreationTypeAttributes, +} + +var mappingLaunchCreateVolumeDetailsVolumeCreationTypeEnumLowerCase = map[string]LaunchCreateVolumeDetailsVolumeCreationTypeEnum{ + "attributes": LaunchCreateVolumeDetailsVolumeCreationTypeAttributes, +} + +// GetLaunchCreateVolumeDetailsVolumeCreationTypeEnumValues Enumerates the set of values for LaunchCreateVolumeDetailsVolumeCreationTypeEnum +func GetLaunchCreateVolumeDetailsVolumeCreationTypeEnumValues() []LaunchCreateVolumeDetailsVolumeCreationTypeEnum { + values := make([]LaunchCreateVolumeDetailsVolumeCreationTypeEnum, 0) + for _, v := range mappingLaunchCreateVolumeDetailsVolumeCreationTypeEnum { + values = append(values, v) + } + return values +} + +// GetLaunchCreateVolumeDetailsVolumeCreationTypeEnumStringValues Enumerates the set of values in String for LaunchCreateVolumeDetailsVolumeCreationTypeEnum +func GetLaunchCreateVolumeDetailsVolumeCreationTypeEnumStringValues() []string { + return []string{ + "ATTRIBUTES", + } +} + +// GetMappingLaunchCreateVolumeDetailsVolumeCreationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingLaunchCreateVolumeDetailsVolumeCreationTypeEnum(val string) (LaunchCreateVolumeDetailsVolumeCreationTypeEnum, bool) { + enum, ok := mappingLaunchCreateVolumeDetailsVolumeCreationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_create_volume_from_attributes.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_create_volume_from_attributes.go new file mode 100644 index 0000000000..79d334cc8c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/launch_create_volume_from_attributes.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// LaunchCreateVolumeFromAttributes The details of the volume to create for CreateVolume operation. +type LaunchCreateVolumeFromAttributes struct { + + // The size of the volume in GBs. + SizeInGBs *int64 `mandatory:"true" json:"sizeInGBs"` + + // The OCID of the compartment that contains the volume. If not provided, + // it will be inherited from the instance. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID of the Vault service key to assign as the master encryption key + // for the volume. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // The number of volume performance units (VPUs) that will be applied to this volume per GB, + // representing the Block Volume service's elastic performance options. + // See Block Volume Performance Levels (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/blockvolumeperformance.htm#perf_levels) for more information. + // Allowed values: + // * `0`: Represents Lower Cost option. + // * `10`: Represents Balanced option. + // * `20`: Represents Higher Performance option. + // * `30`-`120`: Represents the Ultra High Performance option. + VpusPerGB *int64 `mandatory:"false" json:"vpusPerGB"` +} + +func (m LaunchCreateVolumeFromAttributes) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m LaunchCreateVolumeFromAttributes) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m LaunchCreateVolumeFromAttributes) MarshalJSON() (buff []byte, e error) { + type MarshalTypeLaunchCreateVolumeFromAttributes LaunchCreateVolumeFromAttributes + s := struct { + DiscriminatorParam string `json:"volumeCreationType"` + MarshalTypeLaunchCreateVolumeFromAttributes + }{ + "ATTRIBUTES", + (MarshalTypeLaunchCreateVolumeFromAttributes)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_ip_inventory_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_ip_inventory_details.go new file mode 100644 index 0000000000..794c31afff --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_ip_inventory_details.go @@ -0,0 +1,226 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ListIpInventoryDetails Required input parameters for retrieving IP Inventory data within the specified compartments of a region. +type ListIpInventoryDetails struct { + + // Lists the selected regions. + RegionList []string `mandatory:"true" json:"regionList"` + + // List the OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartments. + CompartmentList []string `mandatory:"true" json:"compartmentList"` + + // List of selected filters. + OverrideFilters *bool `mandatory:"false" json:"overrideFilters"` + + // The CIDR utilization of a VCN. + Utilization *float32 `mandatory:"false" json:"utilization"` + + // List of overlapping VCNs. + OverlappingVcnsOnly *bool `mandatory:"false" json:"overlappingVcnsOnly"` + + // List of IP address types used. + AddressTypeList []AddressTypeEnum `mandatory:"false" json:"addressTypeList"` + + // List of VCN resource types. + ResourceTypeList []ListIpInventoryDetailsResourceTypeListEnum `mandatory:"false" json:"resourceTypeList,omitempty"` + + // Filters the results for the specified string. + SearchKeyword *string `mandatory:"false" json:"searchKeyword"` + + // Provide the sort order (`sortOrder`) to sort the fields such as TIMECREATED in descending or descending order, and DISPLAYNAME in case sensitive. + // **Note:** For some "List" operations (for example, `ListInstances`), sort resources by an availability domain when the resources belong to a single availability domain. + // If you sort the "List" operations without specifying + // an availability domain, the resources are grouped by availability domains and then sorted. + SortBy ListIpInventoryDetailsSortByEnum `mandatory:"false" json:"sortBy,omitempty"` + + // Specifies the sort order to use. Select either ascending (`ASC`) or descending (`DESC`) order. The DISPLAYNAME sort order + // is case sensitive. + SortOrder ListIpInventoryDetailsSortOrderEnum `mandatory:"false" json:"sortOrder,omitempty"` + + // Most List operations paginate results. Results are paginated for the ListInstances operations. When you call a paginated List operation, the response indicates more pages of results by including the opc-next-page header. + // For more information, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + PaginationOffset *int `mandatory:"false" json:"paginationOffset"` + + // Specifies the maximum number of results displayed per page for a paginated "List" call. For more information, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + PaginationLimit *int `mandatory:"false" json:"paginationLimit"` +} + +func (m ListIpInventoryDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ListIpInventoryDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.ResourceTypeList { + if _, ok := GetMappingListIpInventoryDetailsResourceTypeListEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceTypeList: %s. Supported values are: %s.", val, strings.Join(GetListIpInventoryDetailsResourceTypeListEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingListIpInventoryDetailsSortByEnum(string(m.SortBy)); !ok && m.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", m.SortBy, strings.Join(GetListIpInventoryDetailsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListIpInventoryDetailsSortOrderEnum(string(m.SortOrder)); !ok && m.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", m.SortOrder, strings.Join(GetListIpInventoryDetailsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListIpInventoryDetailsResourceTypeListEnum Enum with underlying type: string +type ListIpInventoryDetailsResourceTypeListEnum string + +// Set of constants representing the allowable values for ListIpInventoryDetailsResourceTypeListEnum +const ( + ListIpInventoryDetailsResourceTypeListResource ListIpInventoryDetailsResourceTypeListEnum = "Resource" +) + +var mappingListIpInventoryDetailsResourceTypeListEnum = map[string]ListIpInventoryDetailsResourceTypeListEnum{ + "Resource": ListIpInventoryDetailsResourceTypeListResource, +} + +var mappingListIpInventoryDetailsResourceTypeListEnumLowerCase = map[string]ListIpInventoryDetailsResourceTypeListEnum{ + "resource": ListIpInventoryDetailsResourceTypeListResource, +} + +// GetListIpInventoryDetailsResourceTypeListEnumValues Enumerates the set of values for ListIpInventoryDetailsResourceTypeListEnum +func GetListIpInventoryDetailsResourceTypeListEnumValues() []ListIpInventoryDetailsResourceTypeListEnum { + values := make([]ListIpInventoryDetailsResourceTypeListEnum, 0) + for _, v := range mappingListIpInventoryDetailsResourceTypeListEnum { + values = append(values, v) + } + return values +} + +// GetListIpInventoryDetailsResourceTypeListEnumStringValues Enumerates the set of values in String for ListIpInventoryDetailsResourceTypeListEnum +func GetListIpInventoryDetailsResourceTypeListEnumStringValues() []string { + return []string{ + "Resource", + } +} + +// GetMappingListIpInventoryDetailsResourceTypeListEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListIpInventoryDetailsResourceTypeListEnum(val string) (ListIpInventoryDetailsResourceTypeListEnum, bool) { + enum, ok := mappingListIpInventoryDetailsResourceTypeListEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListIpInventoryDetailsSortByEnum Enum with underlying type: string +type ListIpInventoryDetailsSortByEnum string + +// Set of constants representing the allowable values for ListIpInventoryDetailsSortByEnum +const ( + ListIpInventoryDetailsSortByDisplayname ListIpInventoryDetailsSortByEnum = "DISPLAYNAME" + ListIpInventoryDetailsSortByUtilization ListIpInventoryDetailsSortByEnum = "UTILIZATION" + ListIpInventoryDetailsSortByDnsHostname ListIpInventoryDetailsSortByEnum = "DNS_HOSTNAME" + ListIpInventoryDetailsSortByRegion ListIpInventoryDetailsSortByEnum = "REGION" +) + +var mappingListIpInventoryDetailsSortByEnum = map[string]ListIpInventoryDetailsSortByEnum{ + "DISPLAYNAME": ListIpInventoryDetailsSortByDisplayname, + "UTILIZATION": ListIpInventoryDetailsSortByUtilization, + "DNS_HOSTNAME": ListIpInventoryDetailsSortByDnsHostname, + "REGION": ListIpInventoryDetailsSortByRegion, +} + +var mappingListIpInventoryDetailsSortByEnumLowerCase = map[string]ListIpInventoryDetailsSortByEnum{ + "displayname": ListIpInventoryDetailsSortByDisplayname, + "utilization": ListIpInventoryDetailsSortByUtilization, + "dns_hostname": ListIpInventoryDetailsSortByDnsHostname, + "region": ListIpInventoryDetailsSortByRegion, +} + +// GetListIpInventoryDetailsSortByEnumValues Enumerates the set of values for ListIpInventoryDetailsSortByEnum +func GetListIpInventoryDetailsSortByEnumValues() []ListIpInventoryDetailsSortByEnum { + values := make([]ListIpInventoryDetailsSortByEnum, 0) + for _, v := range mappingListIpInventoryDetailsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListIpInventoryDetailsSortByEnumStringValues Enumerates the set of values in String for ListIpInventoryDetailsSortByEnum +func GetListIpInventoryDetailsSortByEnumStringValues() []string { + return []string{ + "DISPLAYNAME", + "UTILIZATION", + "DNS_HOSTNAME", + "REGION", + } +} + +// GetMappingListIpInventoryDetailsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListIpInventoryDetailsSortByEnum(val string) (ListIpInventoryDetailsSortByEnum, bool) { + enum, ok := mappingListIpInventoryDetailsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListIpInventoryDetailsSortOrderEnum Enum with underlying type: string +type ListIpInventoryDetailsSortOrderEnum string + +// Set of constants representing the allowable values for ListIpInventoryDetailsSortOrderEnum +const ( + ListIpInventoryDetailsSortOrderAsc ListIpInventoryDetailsSortOrderEnum = "ASC" + ListIpInventoryDetailsSortOrderDesc ListIpInventoryDetailsSortOrderEnum = "DESC" +) + +var mappingListIpInventoryDetailsSortOrderEnum = map[string]ListIpInventoryDetailsSortOrderEnum{ + "ASC": ListIpInventoryDetailsSortOrderAsc, + "DESC": ListIpInventoryDetailsSortOrderDesc, +} + +var mappingListIpInventoryDetailsSortOrderEnumLowerCase = map[string]ListIpInventoryDetailsSortOrderEnum{ + "asc": ListIpInventoryDetailsSortOrderAsc, + "desc": ListIpInventoryDetailsSortOrderDesc, +} + +// GetListIpInventoryDetailsSortOrderEnumValues Enumerates the set of values for ListIpInventoryDetailsSortOrderEnum +func GetListIpInventoryDetailsSortOrderEnumValues() []ListIpInventoryDetailsSortOrderEnum { + values := make([]ListIpInventoryDetailsSortOrderEnum, 0) + for _, v := range mappingListIpInventoryDetailsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListIpInventoryDetailsSortOrderEnumStringValues Enumerates the set of values in String for ListIpInventoryDetailsSortOrderEnum +func GetListIpInventoryDetailsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListIpInventoryDetailsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListIpInventoryDetailsSortOrderEnum(val string) (ListIpInventoryDetailsSortOrderEnum, bool) { + enum, ok := mappingListIpInventoryDetailsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/list_ip_inventory_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_ip_inventory_request_response.go new file mode 100644 index 0000000000..746a9c89a3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/list_ip_inventory_request_response.go @@ -0,0 +1,157 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListIpInventoryRequest wrapper for the ListIpInventory operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/core/ListIpInventory.go.html to see an example of how to use ListIpInventoryRequest. +type ListIpInventoryRequest struct { + + // Details required to list the IP Inventory data. + ListIpInventoryDetails `contributesTo:"body"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListIpInventoryRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListIpInventoryRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListIpInventoryRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListIpInventoryRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListIpInventoryRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListIpInventoryResponse wrapper for the ListIpInventory operation +type ListIpInventoryResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The IpInventoryCollection instance + IpInventoryCollection `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // For list pagination. When this header appears in the response, additional pages + // of results remain. For important details about how pagination works, see + // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For list pagination. A pagination token to get the total number of results available. + OpcTotalItems *int `presentIn:"header" name:"opc-total-items"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. + // Use GetWorkRequest (https://docs.cloud.oracle.com/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the request. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // The IpInventory API current state. + LifecycleState ListIpInventoryLifecycleStateEnum `presentIn:"header" name:"lifecycle-state"` + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource. + // Use GetWorkRequest (https://docs.cloud.oracle.com/api/#/en/workrequests/latest/WorkRequest/GetWorkRequest) + // with this ID to track the status of the resource. + DataRequestId *string `presentIn:"header" name:"data-request-id"` +} + +func (response ListIpInventoryResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListIpInventoryResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListIpInventoryLifecycleStateEnum Enum with underlying type: string +type ListIpInventoryLifecycleStateEnum string + +// Set of constants representing the allowable values for ListIpInventoryLifecycleStateEnum +const ( + ListIpInventoryLifecycleStateInProgress ListIpInventoryLifecycleStateEnum = "IN_PROGRESS" + ListIpInventoryLifecycleStateDone ListIpInventoryLifecycleStateEnum = "DONE" +) + +var mappingListIpInventoryLifecycleStateEnum = map[string]ListIpInventoryLifecycleStateEnum{ + "IN_PROGRESS": ListIpInventoryLifecycleStateInProgress, + "DONE": ListIpInventoryLifecycleStateDone, +} + +var mappingListIpInventoryLifecycleStateEnumLowerCase = map[string]ListIpInventoryLifecycleStateEnum{ + "in_progress": ListIpInventoryLifecycleStateInProgress, + "done": ListIpInventoryLifecycleStateDone, +} + +// GetListIpInventoryLifecycleStateEnumValues Enumerates the set of values for ListIpInventoryLifecycleStateEnum +func GetListIpInventoryLifecycleStateEnumValues() []ListIpInventoryLifecycleStateEnum { + values := make([]ListIpInventoryLifecycleStateEnum, 0) + for _, v := range mappingListIpInventoryLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetListIpInventoryLifecycleStateEnumStringValues Enumerates the set of values in String for ListIpInventoryLifecycleStateEnum +func GetListIpInventoryLifecycleStateEnumStringValues() []string { + return []string{ + "IN_PROGRESS", + "DONE", + } +} + +// GetMappingListIpInventoryLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListIpInventoryLifecycleStateEnum(val string) (ListIpInventoryLifecycleStateEnum, bool) { + enum, ok := mappingListIpInventoryLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_platform_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_platform_config.go new file mode 100644 index 0000000000..806989d08e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_platform_config.go @@ -0,0 +1,129 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstancePlatformConfig The platform configuration to be updated for the instance. +type UpdateInstancePlatformConfig interface { +} + +type updateinstanceplatformconfig struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *updateinstanceplatformconfig) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerupdateinstanceplatformconfig updateinstanceplatformconfig + s := struct { + Model Unmarshalerupdateinstanceplatformconfig + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *updateinstanceplatformconfig) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "AMD_VM": + mm := AmdVmUpdateInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + case "INTEL_VM": + mm := IntelVmUpdateInstancePlatformConfig{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for UpdateInstancePlatformConfig: %s.", m.Type) + return *m, nil + } +} + +func (m updateinstanceplatformconfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m updateinstanceplatformconfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateInstancePlatformConfigTypeEnum Enum with underlying type: string +type UpdateInstancePlatformConfigTypeEnum string + +// Set of constants representing the allowable values for UpdateInstancePlatformConfigTypeEnum +const ( + UpdateInstancePlatformConfigTypeAmdVm UpdateInstancePlatformConfigTypeEnum = "AMD_VM" + UpdateInstancePlatformConfigTypeIntelVm UpdateInstancePlatformConfigTypeEnum = "INTEL_VM" +) + +var mappingUpdateInstancePlatformConfigTypeEnum = map[string]UpdateInstancePlatformConfigTypeEnum{ + "AMD_VM": UpdateInstancePlatformConfigTypeAmdVm, + "INTEL_VM": UpdateInstancePlatformConfigTypeIntelVm, +} + +var mappingUpdateInstancePlatformConfigTypeEnumLowerCase = map[string]UpdateInstancePlatformConfigTypeEnum{ + "amd_vm": UpdateInstancePlatformConfigTypeAmdVm, + "intel_vm": UpdateInstancePlatformConfigTypeIntelVm, +} + +// GetUpdateInstancePlatformConfigTypeEnumValues Enumerates the set of values for UpdateInstancePlatformConfigTypeEnum +func GetUpdateInstancePlatformConfigTypeEnumValues() []UpdateInstancePlatformConfigTypeEnum { + values := make([]UpdateInstancePlatformConfigTypeEnum, 0) + for _, v := range mappingUpdateInstancePlatformConfigTypeEnum { + values = append(values, v) + } + return values +} + +// GetUpdateInstancePlatformConfigTypeEnumStringValues Enumerates the set of values in String for UpdateInstancePlatformConfigTypeEnum +func GetUpdateInstancePlatformConfigTypeEnumStringValues() []string { + return []string{ + "AMD_VM", + "INTEL_VM", + } +} + +// GetMappingUpdateInstancePlatformConfigTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUpdateInstancePlatformConfigTypeEnum(val string) (UpdateInstancePlatformConfigTypeEnum, bool) { + enum, ok := mappingUpdateInstancePlatformConfigTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_details.go new file mode 100644 index 0000000000..303ba2b62d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_details.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstanceSourceDetails The details for updating the instance source. +type UpdateInstanceSourceDetails interface { + + // Whether to preserve the boot volume that was previously attached to the instance after a successful replacement of that boot volume. + GetIsPreserveBootVolumeEnabled() *bool +} + +type updateinstancesourcedetails struct { + JsonData []byte + IsPreserveBootVolumeEnabled *bool `mandatory:"false" json:"isPreserveBootVolumeEnabled"` + SourceType string `json:"sourceType"` +} + +// UnmarshalJSON unmarshals json +func (m *updateinstancesourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerupdateinstancesourcedetails updateinstancesourcedetails + s := struct { + Model Unmarshalerupdateinstancesourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.IsPreserveBootVolumeEnabled = s.Model.IsPreserveBootVolumeEnabled + m.SourceType = s.Model.SourceType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *updateinstancesourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.SourceType { + case "bootVolume": + mm := UpdateInstanceSourceViaBootVolumeDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "image": + mm := UpdateInstanceSourceViaImageDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for UpdateInstanceSourceDetails: %s.", m.SourceType) + return *m, nil + } +} + +// GetIsPreserveBootVolumeEnabled returns IsPreserveBootVolumeEnabled +func (m updateinstancesourcedetails) GetIsPreserveBootVolumeEnabled() *bool { + return m.IsPreserveBootVolumeEnabled +} + +func (m updateinstancesourcedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m updateinstancesourcedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_via_boot_volume_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_via_boot_volume_details.go new file mode 100644 index 0000000000..f9430b594a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_via_boot_volume_details.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstanceSourceViaBootVolumeDetails The details for updating the instance source from an existing boot volume. +type UpdateInstanceSourceViaBootVolumeDetails struct { + + // The OCID of the boot volume used to boot the instance. + BootVolumeId *string `mandatory:"true" json:"bootVolumeId"` + + // Whether to preserve the boot volume that was previously attached to the instance after a successful replacement of that boot volume. + IsPreserveBootVolumeEnabled *bool `mandatory:"false" json:"isPreserveBootVolumeEnabled"` +} + +// GetIsPreserveBootVolumeEnabled returns IsPreserveBootVolumeEnabled +func (m UpdateInstanceSourceViaBootVolumeDetails) GetIsPreserveBootVolumeEnabled() *bool { + return m.IsPreserveBootVolumeEnabled +} + +func (m UpdateInstanceSourceViaBootVolumeDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateInstanceSourceViaBootVolumeDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateInstanceSourceViaBootVolumeDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateInstanceSourceViaBootVolumeDetails UpdateInstanceSourceViaBootVolumeDetails + s := struct { + DiscriminatorParam string `json:"sourceType"` + MarshalTypeUpdateInstanceSourceViaBootVolumeDetails + }{ + "bootVolume", + (MarshalTypeUpdateInstanceSourceViaBootVolumeDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_via_image_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_via_image_details.go new file mode 100644 index 0000000000..98f733fc40 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/update_instance_source_via_image_details.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateInstanceSourceViaImageDetails The details for updating the instance source from an image. +type UpdateInstanceSourceViaImageDetails struct { + + // The OCID of the image used to boot the instance. + ImageId *string `mandatory:"true" json:"imageId"` + + // Whether to preserve the boot volume that was previously attached to the instance after a successful replacement of that boot volume. + IsPreserveBootVolumeEnabled *bool `mandatory:"false" json:"isPreserveBootVolumeEnabled"` + + // The size of the boot volume in GBs. Minimum value is 50 GB and maximum value is 32,768 GB (32 TB). + BootVolumeSizeInGBs *int64 `mandatory:"false" json:"bootVolumeSizeInGBs"` + + // The OCID of the Vault service key to assign as the master encryption key for the boot volume. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +// GetIsPreserveBootVolumeEnabled returns IsPreserveBootVolumeEnabled +func (m UpdateInstanceSourceViaImageDetails) GetIsPreserveBootVolumeEnabled() *bool { + return m.IsPreserveBootVolumeEnabled +} + +func (m UpdateInstanceSourceViaImageDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateInstanceSourceViaImageDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateInstanceSourceViaImageDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateInstanceSourceViaImageDetails UpdateInstanceSourceViaImageDetails + s := struct { + DiscriminatorParam string `json:"sourceType"` + MarshalTypeUpdateInstanceSourceViaImageDetails + }{ + "image", + (MarshalTypeUpdateInstanceSourceViaImageDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/ip_based_max_connections_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/ip_based_max_connections_rule.go new file mode 100644 index 0000000000..3e18ea50f7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/ip_based_max_connections_rule.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Load Balancing API +// +// API for the Load Balancing service. Use this API to manage load balancers, backend sets, and related items. For more +// information, see Overview of Load Balancing (https://docs.cloud.oracle.com/iaas/Content/Balance/Concepts/balanceoverview.htm). +// + +package loadbalancer + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpBasedMaxConnectionsRule An object that represents the action of configuring an IP max connection rule which specifies +// how many connections IPs can make to a listener. +type IpBasedMaxConnectionsRule struct { + + // The maximum number of connections that the any IP can make to a listener unless the IP is mentioned + // in maxConnections. If no defaultMaxConnections is specified the default is unlimited. + DefaultMaxConnections *int `mandatory:"false" json:"defaultMaxConnections"` + + // An array of IPs that have a maxConnection setting different than the default and what + // that maxConnection setting is + IpMaxConnections []IpMaxConnections `mandatory:"false" json:"ipMaxConnections"` +} + +func (m IpBasedMaxConnectionsRule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpBasedMaxConnectionsRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m IpBasedMaxConnectionsRule) MarshalJSON() (buff []byte, e error) { + type MarshalTypeIpBasedMaxConnectionsRule IpBasedMaxConnectionsRule + s := struct { + DiscriminatorParam string `json:"action"` + MarshalTypeIpBasedMaxConnectionsRule + }{ + "IP_BASED_MAX_CONNECTIONS", + (MarshalTypeIpBasedMaxConnectionsRule)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/ip_max_connections.go b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/ip_max_connections.go new file mode 100644 index 0000000000..d6e216e8d6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/loadbalancer/ip_max_connections.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Load Balancing API +// +// API for the Load Balancing service. Use this API to manage load balancers, backend sets, and related items. For more +// information, see Overview of Load Balancing (https://docs.cloud.oracle.com/iaas/Content/Balance/Concepts/balanceoverview.htm). +// + +package loadbalancer + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IpMaxConnections An object that species the maximum number of connections the listed IPs can make to a listener. +type IpMaxConnections struct { + + // Each element in the list should be valid IPv4 or IPv6 CIDR Block address. + // Example: '["129.213.176.0/24", "150.136.187.0/24", "2002::1234:abcd:ffff:c0a8:101/64"]' + IpAddresses []string `mandatory:"true" json:"ipAddresses"` + + // The max number of connections that the specified IPs can make to the Listener. + MaxConnections *int `mandatory:"true" json:"maxConnections"` +} + +func (m IpMaxConnections) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IpMaxConnections) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/monitoring/alarm_override.go b/vendor/github.com/oracle/oci-go-sdk/v65/monitoring/alarm_override.go new file mode 100644 index 0000000000..ce49d96f67 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/monitoring/alarm_override.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Monitoring API +// +// Use the Monitoring API to manage metric queries and alarms for assessing the health, capacity, and performance of your cloud resources. +// Endpoints vary by operation. For PostMetricData, use the `telemetry-ingestion` endpoints; for all other operations, use the `telemetry` endpoints. +// For more information, see +// the Monitoring documentation (https://docs.cloud.oracle.com/iaas/Content/Monitoring/home.htm). +// + +package monitoring + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AlarmOverride Values to use for an independent evaluation of the alarm. +// You can specify values for query, severity, body, and pending duration. +// When an alarm contains overrides, the Monitoring service evaluates each override in order, +// beginning with the first override in the array (index position `0`), +// and then evaluates the alarm's base values (`ruleName` value of `BASE`) +type AlarmOverride struct { + + // The period of time that the condition defined in the alarm must persist before the alarm state + // changes from "OK" to "FIRING". For example, a value of 5 minutes means that the + // alarm must persist in breaching the condition for five minutes before the alarm updates its + // state to "FIRING". + // The duration is specified as a string in ISO 8601 format (`PT10M` for ten minutes or `PT1H` + // for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M. + // Under the default value of PT1M, the first evaluation that breaches the alarm updates the + // state to "FIRING". + // The alarm updates its status to "OK" when the breaching condition has been clear for + // the most recent minute. + // Example: `PT5M` + PendingDuration *string `mandatory:"false" json:"pendingDuration"` + + // The perceived severity of the alarm with regard to the affected system. + // Example: `CRITICAL` + Severity AlarmSeverityEnum `mandatory:"false" json:"severity,omitempty"` + + // The human-readable content of the delivered alarm notification. + // Optionally include dynamic variables (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/update-alarm-dynamic-variables.htm). + // Oracle recommends providing guidance + // to operators for resolving the alarm condition. Consider adding links to standard runbook + // practices. Avoid entering confidential information. + // Example: `High CPU usage alert. Follow runbook instructions for resolution.` + Body *string `mandatory:"false" json:"body"` + + // A user-friendly description for this alarm override. Must be unique across all `ruleName` values for the alarm. + RuleName *string `mandatory:"false" json:"ruleName"` + + // The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of + // the Monitoring service interprets results for each returned time series as Boolean values, + // where zero represents false and a non-zero value represents true. A true value means that the trigger + // rule condition has been met. The query must specify a metric, statistic, interval, and trigger + // rule (threshold or absence). Supported values for interval depend on the specified time range. More + // interval values are supported for smaller time ranges. You can optionally + // specify dimensions and grouping functions. + // Also, you can customize the + // absence detection period (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/create-edit-alarm-query-absence-detection-period.htm). + // Supported grouping functions: `grouping()`, `groupBy()`. + // For information about writing MQL expressions, see + // Editing the MQL Expression for a Query (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Tasks/query-metric-mql.htm). + // For details about MQL, see + // Monitoring Query Language (MQL) Reference (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Reference/mql.htm). + // For available dimensions, review the metric definition for the supported service. See + // Supported Services (https://docs.cloud.oracle.com/iaas/Content/Monitoring/Concepts/monitoringoverview.htm#SupportedServices). + // Example of threshold alarm: + // ----- + // CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85 + // ----- + // Example of absence alarm: + // ----- + // CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent() + // ----- + // Example of absence alarm with custom absence detection period of 20 hours: + // ----- + // + // CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent(20h) + // + // ----- + Query *string `mandatory:"false" json:"query"` +} + +func (m AlarmOverride) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AlarmOverride) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAlarmSeverityEnum(string(m.Severity)); !ok && m.Severity != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Severity: %s. Supported values are: %s.", m.Severity, strings.Join(GetAlarmSeverityEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/dns_health_check_query_classes.go b/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/dns_health_check_query_classes.go new file mode 100644 index 0000000000..646318a7e7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/dns_health_check_query_classes.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// NetworkLoadBalancer API +// +// This describes the network load balancer API. +// + +package networkloadbalancer + +import ( + "strings" +) + +// DnsHealthCheckQueryClassesEnum Enum with underlying type: string +type DnsHealthCheckQueryClassesEnum string + +// Set of constants representing the allowable values for DnsHealthCheckQueryClassesEnum +const ( + DnsHealthCheckQueryClassesIn DnsHealthCheckQueryClassesEnum = "IN" + DnsHealthCheckQueryClassesCh DnsHealthCheckQueryClassesEnum = "CH" +) + +var mappingDnsHealthCheckQueryClassesEnum = map[string]DnsHealthCheckQueryClassesEnum{ + "IN": DnsHealthCheckQueryClassesIn, + "CH": DnsHealthCheckQueryClassesCh, +} + +var mappingDnsHealthCheckQueryClassesEnumLowerCase = map[string]DnsHealthCheckQueryClassesEnum{ + "in": DnsHealthCheckQueryClassesIn, + "ch": DnsHealthCheckQueryClassesCh, +} + +// GetDnsHealthCheckQueryClassesEnumValues Enumerates the set of values for DnsHealthCheckQueryClassesEnum +func GetDnsHealthCheckQueryClassesEnumValues() []DnsHealthCheckQueryClassesEnum { + values := make([]DnsHealthCheckQueryClassesEnum, 0) + for _, v := range mappingDnsHealthCheckQueryClassesEnum { + values = append(values, v) + } + return values +} + +// GetDnsHealthCheckQueryClassesEnumStringValues Enumerates the set of values in String for DnsHealthCheckQueryClassesEnum +func GetDnsHealthCheckQueryClassesEnumStringValues() []string { + return []string{ + "IN", + "CH", + } +} + +// GetMappingDnsHealthCheckQueryClassesEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDnsHealthCheckQueryClassesEnum(val string) (DnsHealthCheckQueryClassesEnum, bool) { + enum, ok := mappingDnsHealthCheckQueryClassesEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/dns_health_check_query_types.go b/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/dns_health_check_query_types.go new file mode 100644 index 0000000000..8c591f1411 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/dns_health_check_query_types.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// NetworkLoadBalancer API +// +// This describes the network load balancer API. +// + +package networkloadbalancer + +import ( + "strings" +) + +// DnsHealthCheckQueryTypesEnum Enum with underlying type: string +type DnsHealthCheckQueryTypesEnum string + +// Set of constants representing the allowable values for DnsHealthCheckQueryTypesEnum +const ( + DnsHealthCheckQueryTypesA DnsHealthCheckQueryTypesEnum = "A" + DnsHealthCheckQueryTypesTxt DnsHealthCheckQueryTypesEnum = "TXT" + DnsHealthCheckQueryTypesAaaa DnsHealthCheckQueryTypesEnum = "AAAA" +) + +var mappingDnsHealthCheckQueryTypesEnum = map[string]DnsHealthCheckQueryTypesEnum{ + "A": DnsHealthCheckQueryTypesA, + "TXT": DnsHealthCheckQueryTypesTxt, + "AAAA": DnsHealthCheckQueryTypesAaaa, +} + +var mappingDnsHealthCheckQueryTypesEnumLowerCase = map[string]DnsHealthCheckQueryTypesEnum{ + "a": DnsHealthCheckQueryTypesA, + "txt": DnsHealthCheckQueryTypesTxt, + "aaaa": DnsHealthCheckQueryTypesAaaa, +} + +// GetDnsHealthCheckQueryTypesEnumValues Enumerates the set of values for DnsHealthCheckQueryTypesEnum +func GetDnsHealthCheckQueryTypesEnumValues() []DnsHealthCheckQueryTypesEnum { + values := make([]DnsHealthCheckQueryTypesEnum, 0) + for _, v := range mappingDnsHealthCheckQueryTypesEnum { + values = append(values, v) + } + return values +} + +// GetDnsHealthCheckQueryTypesEnumStringValues Enumerates the set of values in String for DnsHealthCheckQueryTypesEnum +func GetDnsHealthCheckQueryTypesEnumStringValues() []string { + return []string{ + "A", + "TXT", + "AAAA", + } +} + +// GetMappingDnsHealthCheckQueryTypesEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDnsHealthCheckQueryTypesEnum(val string) (DnsHealthCheckQueryTypesEnum, bool) { + enum, ok := mappingDnsHealthCheckQueryTypesEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/dns_health_check_r_codes.go b/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/dns_health_check_r_codes.go new file mode 100644 index 0000000000..d5a1702f1d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/dns_health_check_r_codes.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// NetworkLoadBalancer API +// +// This describes the network load balancer API. +// + +package networkloadbalancer + +import ( + "strings" +) + +// DnsHealthCheckRCodesEnum Enum with underlying type: string +type DnsHealthCheckRCodesEnum string + +// Set of constants representing the allowable values for DnsHealthCheckRCodesEnum +const ( + DnsHealthCheckRCodesNoerror DnsHealthCheckRCodesEnum = "NOERROR" + DnsHealthCheckRCodesServfail DnsHealthCheckRCodesEnum = "SERVFAIL" + DnsHealthCheckRCodesNxdomain DnsHealthCheckRCodesEnum = "NXDOMAIN" + DnsHealthCheckRCodesRefused DnsHealthCheckRCodesEnum = "REFUSED" +) + +var mappingDnsHealthCheckRCodesEnum = map[string]DnsHealthCheckRCodesEnum{ + "NOERROR": DnsHealthCheckRCodesNoerror, + "SERVFAIL": DnsHealthCheckRCodesServfail, + "NXDOMAIN": DnsHealthCheckRCodesNxdomain, + "REFUSED": DnsHealthCheckRCodesRefused, +} + +var mappingDnsHealthCheckRCodesEnumLowerCase = map[string]DnsHealthCheckRCodesEnum{ + "noerror": DnsHealthCheckRCodesNoerror, + "servfail": DnsHealthCheckRCodesServfail, + "nxdomain": DnsHealthCheckRCodesNxdomain, + "refused": DnsHealthCheckRCodesRefused, +} + +// GetDnsHealthCheckRCodesEnumValues Enumerates the set of values for DnsHealthCheckRCodesEnum +func GetDnsHealthCheckRCodesEnumValues() []DnsHealthCheckRCodesEnum { + values := make([]DnsHealthCheckRCodesEnum, 0) + for _, v := range mappingDnsHealthCheckRCodesEnum { + values = append(values, v) + } + return values +} + +// GetDnsHealthCheckRCodesEnumStringValues Enumerates the set of values in String for DnsHealthCheckRCodesEnum +func GetDnsHealthCheckRCodesEnumStringValues() []string { + return []string{ + "NOERROR", + "SERVFAIL", + "NXDOMAIN", + "REFUSED", + } +} + +// GetMappingDnsHealthCheckRCodesEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDnsHealthCheckRCodesEnum(val string) (DnsHealthCheckRCodesEnum, bool) { + enum, ok := mappingDnsHealthCheckRCodesEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/dns_health_check_transport_protocols.go b/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/dns_health_check_transport_protocols.go new file mode 100644 index 0000000000..b3ee721586 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/dns_health_check_transport_protocols.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// NetworkLoadBalancer API +// +// This describes the network load balancer API. +// + +package networkloadbalancer + +import ( + "strings" +) + +// DnsHealthCheckTransportProtocolsEnum Enum with underlying type: string +type DnsHealthCheckTransportProtocolsEnum string + +// Set of constants representing the allowable values for DnsHealthCheckTransportProtocolsEnum +const ( + DnsHealthCheckTransportProtocolsUdp DnsHealthCheckTransportProtocolsEnum = "UDP" + DnsHealthCheckTransportProtocolsTcp DnsHealthCheckTransportProtocolsEnum = "TCP" +) + +var mappingDnsHealthCheckTransportProtocolsEnum = map[string]DnsHealthCheckTransportProtocolsEnum{ + "UDP": DnsHealthCheckTransportProtocolsUdp, + "TCP": DnsHealthCheckTransportProtocolsTcp, +} + +var mappingDnsHealthCheckTransportProtocolsEnumLowerCase = map[string]DnsHealthCheckTransportProtocolsEnum{ + "udp": DnsHealthCheckTransportProtocolsUdp, + "tcp": DnsHealthCheckTransportProtocolsTcp, +} + +// GetDnsHealthCheckTransportProtocolsEnumValues Enumerates the set of values for DnsHealthCheckTransportProtocolsEnum +func GetDnsHealthCheckTransportProtocolsEnumValues() []DnsHealthCheckTransportProtocolsEnum { + values := make([]DnsHealthCheckTransportProtocolsEnum, 0) + for _, v := range mappingDnsHealthCheckTransportProtocolsEnum { + values = append(values, v) + } + return values +} + +// GetDnsHealthCheckTransportProtocolsEnumStringValues Enumerates the set of values in String for DnsHealthCheckTransportProtocolsEnum +func GetDnsHealthCheckTransportProtocolsEnumStringValues() []string { + return []string{ + "UDP", + "TCP", + } +} + +// GetMappingDnsHealthCheckTransportProtocolsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingDnsHealthCheckTransportProtocolsEnum(val string) (DnsHealthCheckTransportProtocolsEnum, bool) { + enum, ok := mappingDnsHealthCheckTransportProtocolsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/dns_health_checker_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/dns_health_checker_details.go new file mode 100644 index 0000000000..b7bae47b61 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/networkloadbalancer/dns_health_checker_details.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// NetworkLoadBalancer API +// +// This describes the network load balancer API. +// + +package networkloadbalancer + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DnsHealthCheckerDetails DNS healthcheck configurations. +type DnsHealthCheckerDetails struct { + + // The absolute fully-qualified domain name to perform periodic DNS queries. + // If not provided, an extra dot will be added at the end of a domain name during the query. + DomainName *string `mandatory:"true" json:"domainName"` + + // DNS transport protocol; either UDP or TCP. + // Example: `UDP` + TransportProtocol DnsHealthCheckTransportProtocolsEnum `mandatory:"false" json:"transportProtocol,omitempty"` + + // The class the dns health check query to use; either IN or CH. + // Example: `IN` + QueryClass DnsHealthCheckQueryClassesEnum `mandatory:"false" json:"queryClass,omitempty"` + + // The type the dns health check query to use; A, AAAA, TXT. + // Example: `A` + QueryType DnsHealthCheckQueryTypesEnum `mandatory:"false" json:"queryType,omitempty"` + + // An array that represents accepetable RCODE values for DNS query response. + // Example: ["NOERROR", "NXDOMAIN"] + Rcodes []DnsHealthCheckRCodesEnum `mandatory:"false" json:"rcodes"` +} + +func (m DnsHealthCheckerDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DnsHealthCheckerDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingDnsHealthCheckTransportProtocolsEnum(string(m.TransportProtocol)); !ok && m.TransportProtocol != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for TransportProtocol: %s. Supported values are: %s.", m.TransportProtocol, strings.Join(GetDnsHealthCheckTransportProtocolsEnumStringValues(), ","))) + } + if _, ok := GetMappingDnsHealthCheckQueryClassesEnum(string(m.QueryClass)); !ok && m.QueryClass != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for QueryClass: %s. Supported values are: %s.", m.QueryClass, strings.Join(GetDnsHealthCheckQueryClassesEnumStringValues(), ","))) + } + if _, ok := GetMappingDnsHealthCheckQueryTypesEnum(string(m.QueryType)); !ok && m.QueryType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for QueryType: %s. Supported values are: %s.", m.QueryType, strings.Join(GetDnsHealthCheckQueryTypesEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +}